Automation on iOS not triggering when connected to WiFi

I have set automation on my iPhone to turn on DND when it connects to work WiFi, however, the automation doesn’t work.

Does anyone know why this wouldn’t work?

Here’s a screenshot of rule: Automation screenshot


According to https://support.apple.com/guide/shortcuts/enable-or-disable-a-personal-automation-apd602971e63/ios, an automation based on Wi Fi cannot run automatically. You will get a notification asking if you want to run the automation. You then have to press Run.