By default Magento does not allow html tags in the order comments.
It's in the controller that handles the comments.
Take a look in
vendor/magento/module-sales/Controller/Adminhtml/Order/AddComment.php. There is a line which trims html tags.
$comment = trim(strip_tags($data['comment']));
So if you want tags in comments you need to rewrite the method
Follow the steps mentioned here to override the controller in your custom module.
You will have to override the phtml file as well if you wish to display comments on frontend.
and change this line:
<dd class="comment text"><?php echo $block->escapeHtml($_commentItem->getComment()) ?></dd>
Hope it helps!