Diagnosis
This is almost always a Wi-Fi network issue, not the speaker itself. HomePod Minis are picky about certain router settings, especially if you have both 2.4GHz and 5GHz bands with the same network name (SSID).
How to Fix It
The most reliable fix is to split your Wi-Fi bands. Go into your router settings and give your 2.4GHz and 5GHz networks different names (like 'HomeNet_2G' and 'HomeNet_5G'). Set up your HomePod Mini on the 5GHz band. Also, make sure your router's firmware is up to date.
If That Didn't Work
Try moving the HomePod Mini and your router closer together, even temporarily, to rule out a weak signal. Interference from things like baby monitors or microwave ovens can also cause drops. A restart of your router and the HomePod can clear temporary glitches.
Heads Up
If you use a mesh network system (like Eero, Orbi), make sure the 'client steering' or 'band steering' feature is turned OFF. This feature, which tries to move devices between bands, confuses the HomePod Mini and causes the disconnects.