Pihole repeatedly stops working and I get "Lost Connection to API" in the web UI after updating to v5

Yes, fairly easy I'd say at least. I've written a documentation for this, you can find it here:

In case you need any assistance with this, don't hesitate to ask.