Movement of auv in alt hold mode in ardusub simulation

Greetings to the Community,
I needed a quick help with an issue I was facing, I wanted to test a code on my auv through the ardu sub simulation for which I needed to arm my vehicle and set mode to alt hold .The simulated auv is able to arm successfully but the moment I run my code to change its mode it is able to change to alt hold but shows visible movement from one place to another when ideally it should maintain its position, I am not able to understand why this issue is persisting .Can someone please help what could have been the possible reason that this happened and how can I solve .I need to do the rest of testing in the alt mode itself since I want to test without GPS or any kind of comms .The code for alt hold is the same provided in the ArduSub Gitbook.