It'll still work. OpenSSH doesn't care about output (for ~ stuff), only input, so if you type <enter>~. it will close the connection.
Is this a current-ish version of OpenSSH or some other client/server?
EDIT Interesting! I tested it with fish and it does indeed intercept it! Wonder how that works.
Host *
EnableEscapeCommandline yesThe reason that is disabled in current OpenSSH by default is OpenBSD `pledge` support:
https://security.stackexchange.com/questions/280793/what-att...
On my Linux,
cat<Enter>~.
closes the connection as expected, and no ~ is shown in the terminal.