Is it possible to write a Siri Shortcuts script or automation to detect when my phone disconnects from a particular WiFi network? I’ve seen this posted as an issue on places like Apple discussion forums etc and have trawled the list of scripts and actions but cannot find anything which would perform this or a similar function.

The closest I’ve got is to detect leaving my home area with geofencing. Not ideal.