This happens because the selection is drawn on top and selectionForeground is the same as background.

Repro in demo:
term.setOption('rendererType', 'dom');
term.setOption('minimumContrastRatio', 5);
term.setOption('theme', {
selection: '#ffffff',
selectionForeground: '#000000'
});