Two additional options along these lines:
For borrowing the funds on margin, Interactive Brokers has the best rates that I’ve seen. They are benchmark rate plus 1%, currently that is 1.08%. You pay BM+1.25% on the first $100k, so a $400k loan would be a mixed rate of ~1.2%. That is a variable rate, so some potential risk if rates go up.
For the HELOC option, for those in the NE US, check out PNC Bank. They have a “Choice HELOC” which has a variable rate (currently ~3%) but you can also choose to lock your rate to be fixed. The fixed rate will depend on the term you want, but 10 year fixed rate is ~2.4% currently.