Pi 4 Mate 20.04 Desktop. How can I run without a monitor?

I installed the 64 bit version on my pie 4. I did not install headless mode. It was installed with the full desktop.
I wrote a program than uses some of the gpio to read button presses and light leds to show status. I also am using tc dump to pull info from a Ethernet connected device.
All of this is working. Script runs at boot and all the buttons and leds work correctly. No keyboard or mouse input is required. I have a button for a shut down script also. But if I shut down and pull the hdmi cable after reboot my script does not work.
How can I run this device without a HDMI connection without reinstalling the OS?

thanks in advance

Hi wildcat,

go to /boot/firmware and edit the config.txt:

cd /boot/firmware/
sudo nano config.txt

add these lines of code

framebuffer_width=1920
framebuffer_height=1080
hdmi_force_hotplug=1

you can chance the resolution if you want to an other resolution and comment out following line
#dtoverlay=vc4-fkms-v3d

Have fun.