In normal viewing I'd expect that you would be hard pushed to see the difference. Printing big or pixel peeping I'm sure that you will see a slight difference, more detail from 40MP. If you like printing big or are a heavy cropper then the 40MP will be the tool for the job, otherwise I'd sacrifice resolution for faster AF and go for the stacked sensor!
The charts suggestv that the DR is very similar for X-T4, X-H2 and X-H2S, I assume that the X-H2 benefits from slightly newer technology.
It really depends on what you are shooting, as
@trevorbray says, if you want speed........... but if your X-T4 is fine then I'd spend the money on glass, skip a generation or two and revisit the body in 18-24 months time.