Keyboard and trackpad malfunction every time I close Macbook Air
Hello, I have a 2022 Macbook Air (M2, 8G, Sonoma 14.6.1) and I've been having problems with my keyboard and trackpad ever since I put it in the safe of the hotel I'm staying in. Whenever I close and reopen my laptop, the keyboard seems to be jammed and types loads of spaces or odd symbols (it's slightly different each time after I close/open the laptop) and my trackpad is really glitchy. It is resolved every time I turn the key repeat off and and tracking speed to low, then back to normal. However, when I close and then reopen my laptop the issues are back. It doesn't look like anything is jammed in the keyboard and there doesn't appear to be any other issues with the laptop. It was also only in the safe for a little over an hour along with my iPad (haven't checked for issues there yet). Any idea what might be going on and how I can permanently fix it? Thank you!
[Re-Titled by Moderator]
MacBook Air, macOS 14.6