It really depends. I've worked in games for fifteen years so have had my fair share of experience with both licensed and proprietary engines.
Some companies made it a priority to build a reusable engine some didn't. Some went on to license it and some didn't. Some tried to make their engine reusable and didn't really succeed.
When you make "an engine" very specifically for a certain game you are making a choice to make it less reusable because that's a waste of time to ship your game. This was how things were at one stage. You'd take the codebase, grab out as much as possible and that'd be the start to the next engine. Reuse came later as mid-sized studios dominated and is seen en masse in really big studios. As indies restored the smaller end of studio size it makes more sense to either use a commercial engine or make your tech more specific.
I've also worked in games for almost ~20 years now (though mainly proprietary engines), but i still do not see where "it depends".
I think you are mixing two separate things: the reusability of an engine isn't really relevant nor what defines the engine. The engine is really the tech that supports the gameplay, nothing more or less. It doesn't have to be a framework or library or shared among projects or anything else. It can be any of those, but these are separate - and similarly a framework, library or any shared code doesn't mean that it is an engine.
Some companies made it a priority to build a reusable engine some didn't. Some went on to license it and some didn't. Some tried to make their engine reusable and didn't really succeed.
When you make "an engine" very specifically for a certain game you are making a choice to make it less reusable because that's a waste of time to ship your game. This was how things were at one stage. You'd take the codebase, grab out as much as possible and that'd be the start to the next engine. Reuse came later as mid-sized studios dominated and is seen en masse in really big studios. As indies restored the smaller end of studio size it makes more sense to either use a commercial engine or make your tech more specific.