Don't run wifi and real-time software at the same time.
The same isn't true for SD card access, which does cause dropouts. I've seen a video that suggests that disabling power management for the SD card hardware will correct the problem -- specifically that changing power state causes a 3ms delay. But I'm not quite sure how to go about disabling that on a Raspberry Pi OS.
. WiFi doesn't seem to affect audio latency. That's not true for Raspberry Pi 3, where WiFi and USB ports do run on the same USB hub.
But, incidentally, at my day job I'm working on an embedded Linux system where audio latency matters, and which may well wind up with a WiFi radio (where latency probably doesn't matter so much). So, I'd like to understand issues in this space.