I was struggling with same issue with Yocto when running QEMU through Yocto's runqemu command.
runqemu
Updating U-Boot to 2024.07 or newer should fix your issue as it contains the commit 4f652182a0777085eb9022648c33c5fd8356a0de mentioned by @TomRini.