Using its own TERM is a deliberate design decision. I don't remember how to fix the terminal database, but it's pretty easy (your favorite search engine or LLM should be able to help you there).
If I install a terminal and SSH doesn't work from it out of the box, I would describe that as a bug and wonder if I need to read the full manual to not fall foul of other gotchas
I definitely have had to poke at things a bit, even where they "should" work. I use salt in my homelab and eventually got the xterm-ghostty.terminfo file and I put it in my baseline salt config, then you run 'tic -x xterm-ghostty.terminfo'.