Is there any way to still run GCode, even when the printer is not connected?

I'm on the latest OP RC. I have an Ender 5, and had the stock board. On that board, I always left the USB connected, and had a smart plug, controlled by MQTT to turn the printer off. So even if the printer was off, the board would still stay connected. On that board, there were no issues.

Now, I put in the SKR Mini E3, and apparently, it has problems when the board stays connected to USB and the printer is turned off via the smart plug. So I did the tape on the 5v trick, and it prints normally now.

However, before, using the PSU Control plugin and the MQTT plugin(@MQTTPublish command), the printer would automatically turn on and do its thing when I started a print job. But now, of course, the board doesn't stay connected when the printer is powered off. Part of the problem is that the GCode doesn't seem to run if OP isn't connected to the board, even though that @MQTTPublish GCode doesn't need to be sent to the printer.

Is there any way to have PSU Control still send the GCode to turn the printer on, and then connect automatically? Or is there some other workflow that would accomplish this? Right now, I have to manually turn the smart plug on and then manually connect.

So I figured out the workaround, so I figured I would post it here. But I still have a small issue, if anyone can help. The issue I'm still having is at the bottom.

Pretty sure there's no easy way to still allow the GCODE commands to get processed if the printer board isn't connected. So I used system commands here. I ended up using curl commands to hit the Restful API of my Home Assistant install, which has the smart plug setup in it, to turn it on and off. And I used a bash script to get the state of the plug and used that in the Sensing section of the PSU Control plugin.

After that, I was able to have the printer turn on and off, even if the board wasn't connected. But it still wouldn't autoconnect. So I used the Port Lister plugin. That plugin monitors the serial ports, and automatically refreshes the list when the OS detects one, and it then connects to it after x seconds(20s by default). I had to increase that number to 30 to get it to connect.

Now the only issue is that it won't let me load a GCODE file if the printer is not connected. I was hoping to be able to kick off prints, either through OP or AstroPrint, without having to worry about whether or not the printer is connected or not. Does anyone have a solution to that? I just want to be able to start a print, and the GCODE in the print would kick off a series of events that powers on the printer, waits for it to connect, and then goes on to do the actual GCODE magic.