Indeed this seems to be the issue, same as here: https://dietpi.com/forum/t/rpi-4-8gb-cant-start-kodi/5729/18
Probably for some reason the second unused screen/HDMI port is used when starting Kodi via GBM from console. Probably it works when actively disabling the second HDMI port, or there is another way to force it using the 1st/foreground screen/port, despite a second one is available.