It seems like a fairly common problem that these cameras can fail due to the RJ45 port on the back pulling up off the circuit board. Symptoms include flashing green light, unstable Unifi Protect application (keeps crashing) or the camera simply doesn't power on. There are several threads out there on this topic and it seems to affect other models such as the UVC-G3 and others. There is a good thread here on the topic relating to the G3: https://community.ui.com/questions/I-broke-the-RJ45-of-my-brand-new-G3-PRO-/e8afb284-ae60-4afe-8c81-2aa1b9bcf5e6
If you want to cut to the chase, there is a guy (TomBK) who you can directly DM to get you a custom made replacement board that he makes himself: https://community.ui.com/questions/I-broke-the-RJ45-of-my-brand-new-G3-PRO-/e8afb284-ae60-4afe-8c81-2aa1b9bcf5e6#answer/4c00c8eb-2913-410c-90df-466f67aadbfd
If you are interested in the gory details of a repair, keep reading.
The first step is to open the camera. You basically unscrew the plastic lens cover which will be on there quite tight, a screw driver across the face of the lens will give some leverage. When you open it up you can get to the next step which is to remove the four longer screws holding the IR Beam / LEDs.
It's interesting to see the two desiccant packets in there to mop up any extra moisture that can get in.
The next step is to remove the four flatter and shinier Phillips head screws to remove the main camera assembly. It's interesting to note that there is a USB port in there. As a test, I was able to power up the camera with it, but I didn't mess around any further. I suspect this could be a fun avenue for further investigation.
If you've made it this far, it should not be hard to get to, and remove, the little board that holds the RJ45 port. You can see in this photo the arrows showing the complete separation of the RJ45 port from the board. In my case it had ripped up the traces and while in the camera was giving an intermittent bad connection.
The other side of the board has a 12-pin header connector to connect to the camera sub-assembly. The repair involves essentially repairing those electrical connections. By scratching away at the top layer of the PCB I was able to see where those traces went on the connector. Here is my assessment of the board pinout.
This is my crude drawing of how to map the pins on the RJ45 to the connector on the other side of the board.
You can see on the other side of the board where Pin 0 is marked on the actual board.
In my case I didn't have the tools or even the solder paste to try an "on board" repair. Some people have used conductive ink pens with some success as well. I went old-skool and just used some wire, which I colour coded to the normal CAT5 scheme.
The hacky part is to then wrap it around and connect it to the other side. If you use my method, the camera will no longer be waterproof since it won't close properly when you put it all back together. This wasn't a problem for me so I routed the wires through those existing holes which I no longer will be using.
I used a lot of electrical tape to isolate the wires from each other and also to add a bit of strength. On the other side it looked like this.
Because this board is also slightly thicker now with my repair, it doesn't fit as neatly back against the camera board, but it still works.