In Mojave, as observed, pressing the red cross will close the window but the indicator dot remains present until Messages.app is no longer the foreground app - i.e. clicking anywhere on the screen will result in the app closing.
...
I can finally remove Messages from my (start hidden) login items to avoid me missing new messages.
EDIT: For what it's worth, I notice Calendar.app has a similar behaviour once the window is closed - the indicator dot disappears once its no longer in the foreground.
For me, closing all messages windows and then clicking around elsewhere definitely does not result in the messages app closing. I can still see it running in Activity Monitor and when doing ps in Terminal. The PID remains the same, meaning it has not been quit or relaunched at any point. So, I'm not sure what's going on because I do believe other people are seeing different behaviour to this. Calendar also does not quit for me and instead stays open all the time same as Messages and all other apps.
By the way, Messages.app has supported remote push notifications for a long time now. This is definitely not new in Mojave, and has been around since at least Sierra and I think long before that even. So you haven't had to have it autolaunch for quite a while.