Hi Atul,
While using the scroll to function, the only thing that actually needs the class is the element you want to scroll to. You mention that the page itself also has the same class, which should not be neccessary and might give issues. Make sure your class declaration is distinctive and is not used anywhere else on the page.
If this is the only scenario where you want your user to scroll to this specific part of the page, I think you currently have the correct solution and removing the class from your page might solve the issue.
If you always want your users to be redirected to this part of the page, you could also try triggering the scroll-to functionality in a seperate nanoflow which you trigger on the page itself.
If those options don't work, it might also be valuable to share your page structure, your class declaration on the element you want to scroll to and in the nanoflow action so we can provide better help. The way you explain it now, it does sound like something hasn't refreshed correctly which is hard to tell without some examples.