I cant remember how I did it but on my iPhone...🤷♂️
I have shortcut automation set by location to shut off Wi-Fi when I leave home (about 5 blocks) and to turn back on when I get near home. But I do remember toggling off Ask Before Running
EDIT:
Never mind, it gives shortcut notification saying its off, but I never really checked until today...
It never shutoff regardless of notifications.
Sorry.