You are using the wrong trigger. Instead of the binary sensor, you should use the event from the Unifi Doorbell like described in the Home Assistant Unifi Protect documentation and then filter for ring events. It’s faster and works better.
UniFi Doorbell + Sonos: Speed and Reliability Boost - Blueprints Exchange - Home Assistant Community