Inconsistent highlighting on VSCode with Ocaml Platform

Are you still having this issue?

My guess is that one of the examples is using the “semantic highlighting” feature to let the language server determine the highlighting of the code. That feature was added to the ocaml-lsp language server in a previous release, so the other example may be using an older language server without semantic highlighting support

You can try enabling/disabling semantic highlighting in VS Code to see if it solves your issue. Either edit the editor.semanticHighlighting.enabled setting in your settings.json or use the settings UI: