Using a CW answer here as a combinations of the comments by daleif, Torbjørn T and myself.
None of the examples in the tcolorbox manual uses the ex dimension, only cm, pt or mm are used.
attach boxed title to top left uses TikZ in the background, this in turn uses the \nullfont in order to suppress (see the tcolorbox : attach boxed title has no effect comment), as such ex has no effect as a dimension specification.
Thanks to daleif and Torbjørn T. for their useful comments -- those posts were incorporated here in short.
Back to the code itself -- shifting could be done with some reasonable values, such as \tcboxedtitleheight/2, for example.
\documentclass{article} \usepackage[skins]{tcolorbox} \newtcolorbox{mybox}[2][]{ enhanced, attach boxed title to top left={yshift=\tcboxedtitleheight/2}, colframe=black, colback=white, fonttitle=\bfseries, colbacktitle=white, coltitle=black, boxed title style={ frame hidden, }, title=#2, #1 } \setlength{\parindent}{0em} \pagestyle{empty} \begin{document} \begin{mybox}{hello world} this is a test \end{mybox} \end{document}

exlength units here. Trymmorptinsteadtcolorboxmanual never useexunits, onlymm,cmorptare applied. Theexspecification is disregarded either by design or it is a bug{tikzpicture}environment should not produce any “output” since this may totally scramble the positioning system of the backend drivers. The suppressing of normal text, by the way, is done by temporarily switching the font to\nullfont. You can, however, “escape back” to normal TeX typesetting. This happens, for example, when you specify a node."