It's possible that your Azure account subscription is blocking outbound SMTP connections on TCP port 25. This is a security measure that is in place in Azure to protect customers and conform to industry standards.
There are certain Azure subscription types that allow outbound SMTP connections on port 25 for virtual machines, but this is not the case for all subscription types. Additionally, it's recommended that you use authenticated SMTP relay services like SendGrid to send email from Azure VMs or App Services.
Therefore, it's best to check if your subscription type is on the list of allowed subscriptions, and if not, consider using an authenticated SMTP relay service like SendGrid or configuring the Simple Mail Transfer Protocol (SMTP) connector in Azure Logic Apps.
If none of these options work, you can contact Azure support for further assistance. Make sure to select the right issue type when creating a support ticket, in this case, "Technical > Virtual Network > Cannot send email (SMTP/Port 25)."