When calling window.print() in Chrome, how can I fix the issue where it behaves unexpectedly only on the first print?

This issue has been occurring for about a month. It doesn’t happen in Naver Whale browser but does occur in Chrome and Edge. When window.print() is called for the first time, it behaves unexpectedly. How can I resolve this issue?

I’m using Angular, and the parameters required for printing are passed through the URL. When window.print() is called for the first time, the print preview window opens, but the URL gets reset, causing an issue. From the second print onwards, it works as expected. How can I resolve this issue?