I had a similar problem - rail fell down several times, dispoite trying ever fitting around. In the end, my more knowledgable DIY friend said the plaster would be fixed to a baton & I would have to find that & afix to the the baton.
This was done by tapping the wall to find the non hollow part & use a dowel to confirm
Unfortunately it means they are not an exact equal distance from the window, but nobody (other than me - it's only about an inch or so in the difference!!) would notice. Curtains have been back up for about 2 years & still perfect.
Probably explains why so many shelves & coat racks came down on me over the years!!
Sorry if my language is not technically correct, but hope you get the gist !!!