is there any way to not lose your progress in the gym after you don't go there for 2 days
You don't lose progress for not going to the gym, you lose it because you don't sleep. You should sleep 8 hours everyday to not get sleep deprivation effect which drains you of XP every hour.