Thanks, let me explain what's the problem in our case.
I let Tasker intercept ALL the notifications, regardless of their source and purpose. And nothing received wnen started/stopped the casting.
The second hint might be smarter but we have a huge problem here: not very sure exactly which app is responsible of receiving the casting requests. Even if I found out not sure if I'll find this app among the ones enumerated in Tasker's app listt. maybe it's not a task, just a service?
I still can see better chances to find out why none of these notifications cannot be intercepted by Tasker, and modify the appropriate settings to change the situation. That's why a discussion with the Tasker author would be excellent. Unfrtunately no feedback from him yet.