The answer is obvious, some environmental parameter is not ideal and it is retreating until conditions improve. You mentioned nothing about the the set up and I have to assume that something is not right. Some things to consider are of course temperature, humidity, water quality, tank size, other tank inhabitants, disturbance to the tank from the outside etc., should all be thoroughly evaluated. Also you did not mention how long you have had this frog. It is not unreasonable for it to take a month for it to adapt to captivity and the stresses associated with it.
-----
*Humans aren't the only species on earth... we just act like it.
".the oldest task in human history: to live on a piece of land without
spoiling it."
Aldo Leopold (1938)