Mautic 5 doesn't automatically attach file into the sent email triggered from Form action

Your software
My Mautic version is: v5.1.0
My PHP version is: 8.0.30
My Database type and version is: 8.0.30

Your problem
My problem is:

Just discovered the bug that Mautic 5 doesn’t attach file into the email that is automatically sent once the Form action to send email is triggered as a result of form submission. This is despite the fact that the attachment file is attached in the Advanced tab within the template Email page in Mautic.

Any suggestion to resolve this issue is gladly appreciated with thanks.

These errors are showing in the log:
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /home/DOMAIN/public_html/mautic/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraphNode.php

Steps I have tried to fix the problem:

I tested creating a new email with attachment file and perform test send email, and found out that the attachment isn’t attached within the email.