Apple - Can I have iOS Automation shortcuts run automatically?
EDIT: This has improved with iOS 14: In iOS 14, Turn off "Ask Before Running" to avoid getting a notification and have automations run automatically in the background. See full list at See https://support.apple.com/guide/shortcuts/enable-or-disable-a-personal-automation-apd602971e63/ios
Not all triggers can make an automation run in the background.
When you Arrive, Leave, connect to CarPlay, or use the Before I Leave or Time of Day triggers, or try to automate connecting to Wi-Fi or Bluetooth, your shortcuts will only show up as notifications and won't run in the background. These are the only triggers where a user may not be in control of their device or it's state, and thus seem to be limited for security reasons – all other triggers can run in the background.
https://imore.com/whats-new-siri-shortcuts-betas. See under "Personal automation". It's a long page, so cmd + F.
https://support.apple.com/guide/shortcuts/enable-or-disable-a-personal-automation-apd602971e63/ios