HighlightLayer There is still a problem with the dependency handling of the code

If you only look at the help documentation, you cannot use the highlightlayer feature alone
@babylonjs/core”: “^4.2.1”,
HighlightLayer has Dependent
import {HighlightLayer} from “@babylonjs/core/Layers/index”;
import {BoundingBoxRenderer} from “@babylonjs/core/Rendering/boundingBoxRenderer”;

You can just do import { HighlightLayer } from "@babylonjs/core"; on 5.0, I recommend updating.