I have latest n8n 1.90.2 running in Docker container. I have set the host and it works otherwise fine but when triggering error, it incorrectly defaults to http://localhost:5678. I fixed this for me with Code string replace but thought it is good to report this as a bug.
Oh thanks to BuddiesD I realised to check worker envfile params and it was missing the N8N_HOST=host and now works fine. So you can close this issue. Thanks!