I did a search and found a thread from 2021 with the same issue as me but no follow up. Basically I had this exact same issue with another automation app and switched to Tasker in hopes of not having it happen.
I have a very simple location triggered task to either set my ringer and notification volume to 50% or 100% depending on if I get home or leave home.
What happens is Tasker runs and in my phones UI the volume slider moves to the correct position but the actual volume doesn't change. In the previous thread it was suggested to put a wait before changing the volume so I put a 3sec wait then change ringer then another 3 sec wait change notification. This did not fix the issue as again the UI shows the slider moved to the correct spot but my volume didn't change.
My only other thought is that it has something to do with my phone being connected to my cars Bluetooth (or android auto thru USB as I use both) when the task excites that is causing it to not work.
I have not had the chance to look into setting something up to wait till the phone disconnects but it would be cool to know what is causing this or if anyone smarter than me has any ideas. Thanks in advance for any help.