I recently set up ghost on a regular VPS and it sends "internal" emails like 2fa and invites directly from the docker container as far as I can tell.
The sender is the server domain (and ip). (Which btw. gets flagged as spam in my case because I use that domain with tutanota...)
Only bulk/userfacing emails go through mailgun, as far as I can tell, but havent tested this yet in detail.
Maybe that helps you in debugging.