Hello everyone. I went from a MacBook Pro 2018 with Logitech K380 keyboard and MX Master 2S mouse where Mission Control worked perfectly to a Macbook Air M2 and as for you the problem presented itself that Mission control works randomly.I found an article about Universal Control introduced with the new version of macOS. I turned it off and it looks like Mission control is always working now.
I believe that bad Logitech software does not handle Universal Control correctly.
System Preferences -> Displays -> Universal Control