Hardwired Video Doorbell, works for a few days and then goes into set up mode

Hi there,

I’m sure this has been covered several times, but I can’t find a solution for my problem.
I purchased the regular Ring hardwired video DB. I installed it by simply replacing it from my old door bell. There were 2 wires involved, which I screwed to the back of the Ring DB and it worked perfectly for 3-4 days, then out of the blue it went into set-up mode. I would then reset the DB and using the app I would get it to work again for another 3-4 days. After a few weeks of this, I decided to return the faulty DB and replace it with another one. Same thing happens with the new one!
What am I doing wrong?
The old doorbell was connected to my mechanical chime bell which has a built in transformer 220-240V - 50Hz, 14.8V - 38VA. There are 2 wires on the left and 2 wires on the right. I presume that on the one side is the power going in and the other are the 2 wires going to the front doorbell. I haven’t touched this wiring as I didn’t think it needed to be rewired.
What am I doing wrong guys?
I have uploaded a photo to see if this helps.