As energy prices go up, hash rate may decline. However, the hash rate is arbitrary. It is the cost of mining the provides the security.
average UK electric price in UK in say 2012 was 13pence kwh
now its 17pence kwh
but. hashrate since 2012 as scaled up by a factor of millions
..
in short ASIC efficiency will scale up the hashrate. while not scaling up the electric cost by the same factor
infact in just the last year. people moving away from using antminer s9 and moving to s19pro have seen that although 1 asic uses 2.5x more electric. and electric has increased by 10% per kwh in price in this time.. the hashrate has not declined.
however. due to mining communities not wanting to shoot self in foot by making difficulty jump by 800%
(14thas vs 110thash)
they have decided to not just replace all rigs of a mining farm from s9 to s19. meaning there was no jump from 100exa to 800exahash in the last year. instead they changed 8x s9 for 1 s19pro. to give same hashrate.. but now instead of using 10.4kwh for the 8 s9's they are only using 3.25kwh for the 1 s19pro
and slowly add another s19pro over time. trying to keep the balance of difficulty rise below 5%