Since this will be in more than 50 years, many events can happen to make Bitcoin secure even though there are no block rewards to incencitive miners.
Bitcoin could become widespread enough for mining to be sustainable with transaction feess, or perhaps in 40 years it will switch to PoS v.24 or something like this

There are many other CryptoCurrencies that will finish coin generation soon.... How will they be able to work then if they are that vulnerable ?