In this case, perform a clean boot to see if any third-party program in the background is causing this problem. Follow the instructions carefully.
https://support.microsoft.com/en-us/topic/how-t...
(The procedure in this article works for Windows 11 and is the same as for Windows 10)
If the problem does not occur after a clean boot. In this same article, there is a technique to help you identify which program is causing this in "How to determine what is causing the problem after you do a clean boot".
After finding the cause or if it does not help, return to normal boot as instructed in "Reset the computer to start normally after clean boot troubleshooting".