By enabling the Stay Awake toggle under Developer Options, which are enabled, my previous phone kept the display on when it was connected via USB. This no longer works on my current phone, which runs Android 11. Developer Options are enabled and the Stay Away toggle is on (Under it says: Screen will never sleep while charging) and my Screen Saver is also set to Off.
Despite these settings being enabled, the screen goes blank after a few minutes even when plugged in. There is another option, Always On Display which forces the screen to stay on at all times, even when not plugged-in, but that drains the battery very fast, so it is not practical.
Since I use the phone as one would an alarm-clock, I would like it to keep showing its lock-screen which shows the current time whenever it is connected via its USB-C port. Is there a workaround to restoring the expected behavior?