Regarding why this happens, this is because Babylon’s outline renderer creates the outline by essentially pre-rendering a second copy of the mesh with the vertices translated according to the normals. If the normals are discontinuous (i.e., not smooth) as they are with the cube, this results in the faces of the outline render disconnecting from each other; and if the angles between the faces are high (again, like the cube shows) then it’s possible to get edge-on to these disconnected faces and see them in isolation, which will cause them to look thin.
Probably the most reliable way to solve this would be to include your own outline mesh in your 3D model (a simple convex mesh with inward-facing normals and your unlit outline material on it). Another option would be to pre-render the mesh manually at a slightly larger scale using the outline material and without writing to the depth buffer, then rendering the real mesh on top of it. This second approach won’t work well on all meshes, though; especially for meshes with small concavities far from their object-space origins, it will tend to shift the concavity in the outline render away from the concavity in the mesh render. That scenario should be handled correctly by Babylon’s built-in outline renderer, but of course at the cost of handling meshes like the cube (which would be handled flawlessly by an upscaled outline mesh pre-render) less well.
Sounds like the stroke renderer was what you were looking for, but since I already typed this I’ll just leave it here for fun.