It doesn't matter whether mining is profitable or not.
There is a certain amount of SHA-256 ASIC mining gear in existence and this mining gear just can't magically "disappear".
If mining becomes unprofitable for some miners, then they will sell their hardware. This means that others will buy that very same hardware.
This doesn't change the hashrate at all. It only means that some part of the hashrate will change ownership.
The hashrate can't decrease unless people really start to throw their hardware into the recycle bin.
But no one with half a brain would do that while there are people who want to buy that hardware.
I know that the hashrate decreased once in the past, but that was only because there was still GPU mining at that time.
GPU mining has the serious flaw that mining gear can be used for something else than mining (e.g. gaming) which puts the network at risk of losing this hashrate again.
Luckily, GPU mining is over, so this can't happen anymore. The waste majority of produced ASICs will keep mining until the end of its lifetime.