Why is this a safety issue? Home batteries are capable of detecting outages and ensuring that they don’t back-feed after an outage. Pila is no different.
If you backfeed during an outage, and then the grid reconnects, you're fighting the grid. If you backfeed during an outage and an electrician is trying to fix lines near you, you can hurt them.
Why does the OP say it "disconnects in 20 ms of detecting an outage"? If it's a UPS, it doesn't need to disconnect - It's just no longer fed by the grid. If it's back-feeding, the point would be to _start_ the connection when you detect an outage. But backfeeding is an extremely bad idea.
I was commenting on the parent's mention of suspecting it could be a UPS that feeds power back into the house. It's one of those things that's super easy to DIY, or even do accidentally, but is super dangerous, so I didn't want anyone else thinking why not. I don't think you could even get a UL certification for such a device.