This is even more pronounced for Unreal, where Final Fantasy VII Remake, Valorant, Apex Legends Mobile, Star Wars Jedi Fallen Order and Survivor, Octopath Traveler, and tons of other wildly profitable games are made in it. CD Projekt Red is making the next Witcher game in Unreal as well. Square Enix has a ton of money and thousands of employees, as does Riot Games, EA, and plenty of other huge companies. Nearly all of these companies have developed their own engines in the past, but Unity and Unreal are just really hard to beat: not only can they offer great performance and stability, as well as easy multiplatform support (can publish on Windows, PlayStation, Switch, Xbox, iOS, Android, etc.), but it also can make development easier since new employees likely already are familiar with the engine, versus if you build your own it can take months for new employees to be productive and contribute much of anything to the project.
Often times they'll still make changes to the engine's source code (miHoyo didn't just download the latest Unity LTS from the website or Unity Hub), but that's still considerably less work than building your own engine from scratch, and in many cases even that's not necessary.
When you lose that audience and enthusiasm among the people who influence next year's technical decisions, eventually you enter the dustbin of history.