When using \urlstyle{same}, the url package will substitute a low 'faked' tilde, even if the lowtilde option is not specified:
\documentclass{article}
\usepackage{url}
\urlstyle{same}
\begin{document}
Tilde: \textasciitilde
Not a tilde: \url{~}
\end{document}
Why does this happen, and is there a way to overrule this?
I am using the IEEEtran class, which forces the \urlstyle{same} option, and I am submitting to a journal, so I'd rather not load the hyperref package (which is suggested as a workaround elsewhere on this site) because that may not be allowed / be silently removed in editing.

\def\UrlTildeSpecial{\do\~{\hbox{\textasciitilde}}}but see Mico's answer also. – yannisl Jan 17 '24 at 04:03\def\UrlTildeSpecial{}should be enough. But better is not to use OT1 encoding. As you mention copy&paste in a comment below:\usepackage[T1]{fontenc}resolves this and other copy&paste problems. – Ulrike Fischer Jan 17 '24 at 09:28\textasciitildeproduces a combining tilde rather than the ascii tilde. – oulenz Jan 17 '24 at 09:30\usepackage[T1]{fontenc}, ~ indeed copies correctly, even the lowered version. I still believe the url package is not behaving according to its own specifications, but my underlying problem is solved. What I don't understand is why with T1 encoding, the high and the lowered tilde suddenly copy as the same character (the ascii tilde), while with OT1 encoding they copy as two different (non-ascii!) characters. That runs entirely counter to the idea that OT1 has the smaller character set and is restricted to ascii. – oulenz Jan 17 '24 at 10:07