In lockdown for 5 days, so decided to try testing my MBA 2011 in configuration you’re using (as close as possible). I connected a monitor via thunderbolt port using a VGA-Thunderbolt adaptor. No wireless mouse, so tried with USB mouse, then with Apple Wireless Touchpad.
Initially had same reaction you had with wired mouse and touchpad. I have a “hot corner” defined to put display to sleep. Each time I used it, display went to sleep, power light went to yellow, then it woke up. Tried same using “sleep” under Apple power options (clicked on small Apple in upper left corner, then “sleep”). Same result. No idea what I did then, but after many times putting it to sleep using both main and secondary displays, it started working correctly. Now, after many restarts, I can’t get it not to work correctly. I’m totally confused.
I suggest you try putting it to sleep from both displays, with cover opened and closed, several times. See if that “shakes it out” as it has on mine.
Just a note on using this mode. Monitor is not supposed to stay on when lid is closed if MB is running on battery.