So, here is the code that will help you in removing this dirty query strings from your page URL:
Please note that, above code will remove the query strings from the page URL and the page will not be reloaded and some functionalities running on the page can be stopped. I recommend you before using this code, please check this code is not affecting running functionalities on your page/module etc.
Please feel free to share your feedback in the comment box below or if you have any question, you can ask too. Best regards, Akhilesh