EDK2 Shell does not work on headless machine



I'm trying to use the EDK2 shell on my old machine to side-load an NVMe DXE driver (with a startup.nsh) for grub to be able to boot / chainload OSes on an NVMe drive. The plan works, except that it works only if the machine has a monitor attached. If it is booted headless, the shell appears to just stall and fail to run the script at all (even if it is changed to just run grub that is configured to boot system on non-NVMe drive).

Any pointer to what might be blocking it? Or is it defected by design that it cannot be used without a monitor?