The issue isn't brightness, it's distance to what you are looking at and focus on the retina. When your eyes can still bring far objects into focus, they produce a signal that causes your eyes to grow longer.
https://newsroom.uw.edu/news-releases/glasses-stop-myopia-ar...