Why am I getting an email size error with SQL Server database mail?
You mentioned that you're using Mailgun as your mail server. Mailgun's terms page say they limit email sizes:

An individual email message may not exceed the per-message size limit
(including attachments) of 25MB or it may be permanently lost.

You'll want to reduce your email sizes to match, or consider using a different SMTP server.