In 1.21.40.20 Preview changelog said:
Chat messages no longer overlap with one pixel (MCPE-119761)
However, these fixes makes chat have gap between every single message appears
Linked issues
relates to 1
Attachments
Comments 3

The attempted fix in 1.21.40.20 added an extra 0.3 pixels to each message:
[media]While this looks alright with some line spacing settings, others show gaps.
While messing around with the hud_screen.json file to attempt a more precise fix, I found a specific setting (0.14px) shows overlap at 4.9x line spacing and gaps at 4.0x line spacing.
This indicates the gap/overlap issues cannot be fixed just by tweaking the JSON UI. The underlying chat message stack renderer must be improved to not misalign messages.