Can't control volume when Tasker is not foreground in Android 12
I have a tasker script that stores the current media volume into a variable and drops the media volume to 0 when I launch specific apps, and when I exit those apps restores the media volume to its previous value.
On Android 11 this ran no problem, but my Oneplus 8 was updated to Android 12 this week and now this script no longer works. If I have tasker open and run the script, it runs no problem, but when I launch the other apps the volume change doesn't work. The script still runs and I still get pop-ups, but the volume doesn't get set and the volume change isn't shown on the screen even when Display is ticked in the Media Volume Action.
I have allowed all permissions and prevented all sleep etc for tasker, but this doesn't seem to be the issue as the script runs and shows pop-ups, the media volume just doesn't change.
I wrote a simple task below to check. The flash (A2) occurs but the volume doesn't change (A1) when I launch the triggering app. When I run the task in tasker both actions work.
Task: MediaVol0
A1: Media Volume [ Level: 0 Display: On ]
A2: Flash [ Text: Dropping volume... Continue Task Immediately: On Dismiss On Click: On ]