I built the OpenCV library as you typically would with CMake, with the only difference being the addition of the Unreal module I linked to it.
When an engine plugin of the same name is found in your project’s plugins folder, it completely overrides the engine’s version of the plugin.
So the solution is to copy and paste Unreal’s OpenCV plugin into your own project’s folder and replace the libs/dlls with the ones you just built with CMake.
(I had to build OpenCV using a different folder due to the max path size limit being reached fairly quickly in CMake when building in the Unreal Plugin folder).