Correct, I use both the EH and XH, and they are indeed not compatible.
I think I can explain why they both exist. JST makes "clone" connectors for other connector makers styles. I believe the Lionel 2.54mm connectors were originally Ledco connectors.