The disappearing PIN code prompt for wireless display with a specific user profile points towards a user profile corruption issue.
Open Command Prompt as administrator and type sfc /scannow. This scans and repairs corrupted system files, which might include user profile components.
Type the following command to perform a quick check and press Enter: DISM /Online /Cleanup-Image /CheckHealth
Type the following command to repair the Windows image and press Enter: DISM /Online /Cleanup-Image /RestoreHealth
Create a new local user profile and see if the PIN code prompt behaves normally there. This helps isolate the issue to the original profile.
Outdated graphics drivers can sometimes cause unexpected behavior with features like wireless display. Check your device manufacturer's website and download the latest drivers for your graphics card.