After the latest update of Shopify there many things are updated which is good but the update for liquid file editor is Even Worse Than before. Every time I am editing a file cursor automatically goes to the top of the file. It is very annoying. Shopify should have to fix this as soon as possible.
If this is a bug and is reproducible (try different browsers clear cache etc) then report it either the merchant support or through the partner support bug report form
https://help.shopify.com/en/questions
https://help.shopify.com/en/questions/partners
The admin code editor is not a reliable work environment and hasn’t been for over a decade.
It’s mainly only good for quick small one off fixes.
If you are doing consistent work on theme files consider switching to either using a workflow based on themekit, or the shopify-cli.