Power off equipment right after turning from busy to idle outside opening hours

We have currently encountered a problem that is typical for 3D printers. If the printer finishes a print outside of opening hours, even though we have set the bridge to power off after 15 minutes, it shuts down immediately. Is there any way to prevent this?
However, we have also had one printer shut down while printing, just after the opening hours were over (20 seconds). The cause is not obvious, the most likely one seems to us that the voltage dropped below the threshold and the bridge detected the idle state and powered off the printer. Could this be the cause and is there any way to prevent it?

This is an upper limit, not a minimum. If the member‘s permission to use the machine ended, it will be switched off. (Unless you enabled „prevent power-off while busy“ and it is still busy.)

Yes that could be the cause. (If you send me the equipment link and time via DM I can take a closer look.)
If the equipment’s power consumption exhibits no 100% reliable threshold (and 3d printers usually don‘t have that) then you either need to find a reliable signal from the printer to use as busy input signal or switch to a different integration method, like Happylab‘s Octoprint plugin.