I just found out that setting UseLayoutRounding="True" on the parent window fixes the problem. However, the other controls now look very sharp-edged. Unfortunately, setting it on the WebView2CompositionControl itself doesn't have any effect.
UseLayoutRounding="True"
WebView2CompositionControl