(WARNING: This answer addresses the initial format of the posting above. After posting this answer, I noticed that the OP had radically changed the question's setup and associated code. For instance, the \myunder
macros is no longer either defined or used. Hence, this answer may not be of much use to either the OP or to future readers of this posting. Oh well.)
Even if you were to change the vertical offset in \dunderline
from 0.5pt to 0.4pt, the macro \myunder
would still suffer from two major defects:
If the argument of \myunder
contains a letter that reaches below the baseline -- such as g
, j
, p
, q
, and y
-- the macro draws two separate thin lines rather than one thick line. Moreover, the upper thin line intersects with the letter(s) that have a component that falls below the baseline. (I think the \smash
directive may be responsible to this unfortunate property.)
If two consecutive \myunder
directives occur, the whitespace between the two groups of words is too big.
Rather than tweak the definition of \myunder
, I'd just load the ulem
package and change the value of \ULthickness
(default value: 0.4pt) via a \renewcommand
instruction -- say, \renewcommand\ULthickness{.8pt}
.

\documentclass{article}
\usepackage[utf8]{inputenc}
\newcommand\dunderline[2][.4pt]{ % use 0.4pt, not 0.5pt
\raisebox{-#1}{\underline{\raisebox{#1}{\smash{\underline{#2}}}}}}
\newcommand{\myunder}{\dunderline}
\usepackage[normalem]{ulem} % for "\uline" macro
\begin{document}
Using \texttt{\string\myunder}
\myunder{thick underlining} \myunder{text}
\medskip
Using \texttt{\string\uline}
\uline{thin underlinining} \uline{text}
\renewcommand\ULthickness{.8pt} % <-- double the default width
\uline{thick underlinining} \uline{text}
\end{document}