A (or my) Rpi4 has two HDMI ports. So you should add also the HDMI port 0 or 1 (or id 2 and id 7). docs
Status screen:
vcgencmd display_power -1 2 | grep -q "1" && echo "on" || echo "off"
vcgencmd display_power -1 7 | grep -q "1" && echo "on" || echo "off"
Regards,
Bert