I would argue that the benefit of getting a mortgage, in general, is less about arbitrage and more about liquidity. If I end up in financial trouble because I’m in between jobs, I’d rather not have sunk 6 figures of my cash into equity that I would then need to borrow against at a higher rate (home equity loan) if I wanted it back. I’d rather have a $1200 monthly mortgage payment and $200k in savings, because then that savings can cover my other expenses too, instead of only removing the need to make mortgage payments. There’s certainly something to be said for the feeling of not having a mortgage, or even being completely debt-free. But if, for example, my budget is $5k per month including the mortgage payments, the 200k I would’ve sunk into the house could instead cover my expenses for over 3 years.Additionally, as DanMa pointed out, if you end up in financial trouble because you're between jobs, having a lower monthly overhead allows you to live off of savings for that much longer.
The factor that's often missing from these calculations is the probability one lives long enough to see the benefits of leveraging a 3-5% APR mortgage into long term investments squeezing out an extra 3-4% ROI over the money that would be saved by paying off the loan sans interest, and also the probability that they are in a condition to enjoy it.
All that said, definitely agree with others about renting being the best choice here. Especially considering OP’s concerns about job security and potential substantial pay cut.