This is because of the ":ascent 'center" part, isn't it?
I guess so. The image bottom is below the text baseline and thus the underline cuts through the image.
 
What would you want Emacs to do instead in this case?

I do understand how Emacs renders what we get here from the perspective of glyph composition. Putting underline over the glyph does make sense in many cases. However, it is clearly not expected in this specific scenario of a bitmap image.

I think that it could be useful to allow images to be drawn "on top" of the underlines, cross-lines, etc.

Best,
Ihor