In general, it is not advisable to run a database in an older compatibility mode permanently, and the relevant Microsoft documentation from
ALTER DATABASE Compatibility Level (Transact-SQL) is:
Use compatibility level as an interim migration aid to work around version differences
So the best option is to avoid doing it if possible.
Having said that, in the real world, we have ridiculous numbers of databases out there on our servers, and security concerns are pressuring us to get off of older versions of SQL Server and Windows. Meanwhile, the application vendor is out of business, or the organization won't upgrade it because it is planning to retire the application (and maybe has been planning to do that for the past few years), or it would just cost too much to upgrade it, etc. So I think it is not a rare situation where databases are being run permanently in an older compatibility mode. Limit your risk by:
- Thoroughly testing the solution
- Maybe don't do this with a database that has a massive amount of code, a lot of users, or a high rate of transactions
- Advise management of the risk