That momentary image flash is most likely a prompt asking you if it is Ok to allow access to those external devices.
Personally I adjusted the "Allow accessories to connect" Security setting in the Privacy & Security System Settings on my M-series laptop to "Automatically when unlocked". As long as you lock the screen when the laptop is unattended and are going to approve the connection anyway, then there really is no difference in security for choosing this option. For what I do, I would have connected devices reboot & the prompt to allow them to reconnect would not always occur so I immediately changed the setting and have had no issues since then. However, I do lock my laptop when it is unattended.
See this Apple article for details:
If your Mac asks you to allow an accessory to connect - Apple Support