From what you describe it appears you may inadvertently invoking a "hot corner" that moves all windows aside to reveal the Desktop. A grey outline at its periphery remains.
Please review See open windows and spaces in Mission Control on Mac - Apple Support, specifically the following:
- Move open windows aside to show the desktop: Press Command-Mission Control, or spread your thumb and three fingers apart on the trackpad. To move the windows back, press the keys again or pinch your thumb and fingers together on the trackpad.
You may have assigned that action to moving the cursor to one of the screen's four corners.
Hot Corners: Use hot corners on Mac - Apple Support