So, when the interest rates go up, you shrink the production because it shrinks your gross earnings which makes it easier to pay off the interest— wait, it doesn't. And usually the interest on the loan already taken doesn't change, does it?
The value of an enterprise is the sum total of its discounted future cash flows. If interest rates are at 0% then a dollar in 10 years from some pie in the sky AI is worth about the same as a dollar today. If interest rates are 10% for a risk free Treasury bond, then a risk free dollar in 10 years is worth about $0.38. You invest accordingly.