Get Mail Activity of MS365: want to filter the mails with To criteria

I got this one with ChatGPT but it isn’t working:
toRecipients/any(r:r/emailAddress/address eq ‘AlexW@contoso.com’)