It is unclear exactly what you have done (list full code & connections).
What is R_US
The fundamental problem is your circuit.
Using an emitter follower is POOR practice; it will attempt to put 2.7V across the LED when ON, overloading the GPIO with unpredictable results. You have shown the LED connected in reverse.
Try a more conventional circuit; the ...
As far as I remember, you need hdmi_force_hotplug=1 in your config.txt if the HDMI screen is not connected at boot time. Otherwise, if you start without an HDMI screen but later connect it, it will not work until you reboot.
SOLVED : Adding these some lines to /boot/config.txt
Look for: The
filter which works for Pi 4 only.
Use group=1 (CEA) for televisions or group=2 (DMT) for monitors.
Select mode from list (using the output from a tvservice -v -m DMT command)
#mode 47: 1440x900 @ 60Hz ...