When the screen is off your Raspberry is unable to receive edid information from the screen, resulting in no (or bad) picture.
You need to download the edid info into a file and edit config.txt for the Pi to load the info from the file on startup, instead of trying to get it directly from the screen.