Except this is not always the case. Regulations haven't evolved yet to force all exchanges across the nations have user protection mechanisms. In Mt. Gox some have still not been compensated, same as with Bitfinex's and Coincheck's hack. And those who were compensated, were partially.
I know they don't always compensate users and it depends. Like if a hack is not big enough to kill that exchange and if they see they will have long term gain if they make compensation to their users. It is possible if they don't have their exchange tokens and bet it as collateral like FTX.
They can die or file bankruptcy and I only say there are some factors to consider when using CEX or DEX.
I honestly feel more safe in a reputable, open-source environment, as with other Bitcoin software like Bitcoin Core and Electrum, than leaving my funds in some stranger with questionable security and money insurance.
Again it depends too. If a person is amateur and can not learn to use non custodial wallet in a few hours because of old age, lack of English reading skills ... using centralized exchange is not too bad. Then try to learn and improve knowledge and practice to use non custodial wallet.
It is acceptable if you are a newbie and use centralized exchange account to store bitcoin. Though, it is not bad to start like that, if you are in this market like 6 months, 1 or 4 years and still don't use non custodial wallets, it is unacceptable.
I only want to say, it is not correct to say CEX is the best or DEX is a best, it depends on specific user and at specific time.