A good test of ankle mobility is to get near a wall and put your foot close to the wall toward it, with about 4 inches between your big toe and the wall. then squat and try to get your knee to touch the wall without lifting your heel. Do not let your knee cave either. Eventually your heel will lift up the closer you get to the wall. there is no gold standard but typically 4 to 5 inches from the wall before your heel comes up is considered normal. If you pass this test then its more of a mind over matter at the gym.
Also do you have low or high arches or other foot issues? plantar fasciitis can lead to tight calves and heel problems; many people wear orthotics to the gym.
you can try lowering the weight and perfecting your form with your heels on the ground, or even buy shoes with a big heel in them, such as some tennis shoes or weightlifting shoes. Squats help with ankle mobility so the more you do them the better off you will be.. so do not stop. If you can do lunges without issues then I am fairly certain your ankles are fine as lunges are essentially the workout version of the ankle mobility test(unless you arent doing them incorrectly!)
Do squats, a stepping exercise(such as lunges or box lunges) a single leg exercise, and a side exercise such as side lunges or sumo deadlifts, a glute exercise or glute/hamstring exercise. These will pretty much hit everything in your lower body so you should not have to worry.
Also Id stretch your calves but not work them out to fix this issue. Try working on your tibia muscles. this will not only reduce tightness in your calves but also help reduce muscle asymmetry. It is an often overlooked muscle. anterior pelvic tilt can also be an issue which can be an even bigger problem, but should not directly affect your ankle mobility.