Creating a company for real estate investment - yay or nay?

My wife and I are considering purchasing a home for around $900k and I have been thinking about the best way to make it work. We currently own the home we live in plus an investment property. The total mortgages are around $500k while the total value is around $1M.

It occurred to me that it might be a good idea to start a company and sell the houses we own to that company. Obviously I'll contact a lawyer if we decide to go ahead with that idea but thought I'd share my thought here first incase anyone has useful information to share. We have around 120k in fairly liquid investments if that would be required to get a mortgage for the company.

My main questions are;

Is this legal?
Would a bank give a mortgage to a company recently created for the purpose of real estate investment?
If so, would the company be able to claim deductions from income tax on all of the new mortgage or only what we owed at the time of sale?

PS sorry if some/all of these are dumb questions, I have never and don't even know anyone who has worked in finance or business.

EDIT: Thanks all for the replies, the suggestion about a look through company was definitely interesting. I don't think anyone mentioned it but chatGPT said my plan would be considered "drawing equity" therefore that portion of the mortgage would not be eligible to claim as a loss on taxable income. Despite really wanting this property I think you're all right, 1.4M is too deep of a hole, I'll sit tight for now.