Both are prone to hacking. You can never really trust be sure of an exchange's security wether it's centralized or decentralized.
yes but the hack scenarios are very different from each other.
the centralized exchange hack happens one time and in that time they steal everything. like hacking $20 million in one go.
but in case of a decentralized exchange since there is no one entity holding all the funds they have to hack every person so it is harder and the resulting loss is smaller.