The challenge is that you have a scene with very large dynamic range.
When you photograph the window from a distance the camera is exposing for the overall scene and you get the curtain somewhat over-exposed and the external scene through the window is fully washed out.
As you approach the window the camera is tending to expose for the central light = external scene and illuminated curtains. The exposure is reduced to approximately correctly expose the window and curtains and the room exposure is now too low.
The overall dynamic range present is such that you will not be able to expose ervy part of the scene correctly in a single photo bit you can make decisions re what parts of the scene will be exposed in what manner.
To expose the curtains and internal parts of the room more correctly as you approacjh the window you need to meter on the sides of the scene, lock the exposure to this setting then recompose the scene as required.
More soon ...