What system do you use to keep your desktop to not immediately shut down during a power outage?
MacOS will allow you to configure the point at which it shuts down after power loss. It's a built-in function, so you don't need additional software or drivers.
https://www.newegg.com/apc-be600m1-5-x-nema-5-15r-2-x-nema-5...
Note that this will only carry it until the UPS batteries run flat, so a power outage of a duration longer than the runtime on the batteries will still shutdown the computer. Larger battery sizes (also more expensive) will run for longer duration's.