With engine-based gamedev, you buy into a monolith and that will dictate basically everything about how the project has to be built.
Web dev is theoretically open but in practice runs on Chrome almost exclusively.
10 years from now, if you have built your site according to WC3 standards, theoretically it should just work on every browser out there.
If Unity goes out of business, and their editor is no longer available, good luck getting your unity project to build in another environment.
Likewise one of the things thats most fiddly and annoying in game engines is dealing with implementation of things like OpenGL that are based on standards but not actually implemented to spec across OSes and hardware.
I agree on the dangers of relying on closed-source, proprietary software but if we wanted to avoid that we could just point to Godot as our monolithic example de jour instead.
Unity is the equivalent of a browser, not an app or even app framework. It just lives in a world where the competitors haven't done the committee thing to ensure interop (and never will).
Web is a standards-based, implementation independent platform. That is completely, categorically different from Unity, which is a proprietary tool for making applications.
Unity isn't the browser, it's web-flow or square-space. Except it doesn't give you artifacts which are interoperable with other tools at the end.