Cursor Color of CodeMirror EditorView

Is anyone using the EditorView from @codemirror/View. I am creating an instance and binding it to the DOM but am struggling to change the cursor styling.

It is alright in Light theme, but in Dark theme the cursor remains a thin black bar which cannot be seen.