by default sound comes out on headphone jack
what i have done because i don't use headphone jack;
disable headphone jack
you can do it in soud setting: hardware tab put the 1st one off (this is the headphone jack)
Result: one HDMI stay's active
Test: reboot and sound comes out on HDMI
My system
RPi4 4 Gb
Ubuntu mate 20.4 raspi 64 bit
OS 5.4.0-1015-raspi
just give a try
if later on you want to use sound on headphone jack you can enable it again