Sometimes there're lots of different sessions opened in own terminal's tabs and it's rather desirable to have theirs initial titles (named by session name) locked since local title tweaks make those sessions indistinguishable. It's obvious that controlling all the bits and pieces of remote software running is too wide task to be accomplished in reality, so the most suitable way would be setting a knob prohibiting any further changes to a title. I doubt there's such a knob, but who knows?
According to this list of terminal directives (for various terminals, including X terminal emulators), no terminal directive supplies this exact feature (a shame).
In the unlikely case you're using
xterm, you can disable ‘title ops’ using the Xterm Control-right-button menu, and very likely also using a command line option and X11 resource.
There may be hacks/kludges to fix the issue at the far end, but there'd be quite a bid of ad-hockery involved, and there isn't one catch-all solution.
I'm afraid that the solutions are specific to each terminal
For Xterm: If you want to lock the window title for a specific xterm instance from the command line you could use:
xterm -xrm "xterm*allowTitleOps: false" -T "my title"
This is useful if the Xterm is started from a script, or if you want to override the defaults.
For gnome-terminal: In the case of
gnome-terminal, you need to create a profile with the option "When termnial commands set their own title: Keep initial title" and then start
gnome-terminal like so:
gnome --tab-with-profile=<name of your profile> -t "<your window title>"