Short answer: no. Longer answer: it depends on how long you stay, local price-to-rent ratios, and what you'd do with the money you don't put into a down payment.
Mortgage interest (in year one, roughly 80% of your payment is interest, not equity). Property taxes. Maintenance (the 1–2% rule: a $400k home costs $4k–$8k/year to maintain). Transaction costs (3–5% to buy, 5–8% to sell). All of this goes into the home, not into your pocket.
Flexibility to move without a 6–8% transaction cost. No maintenance liability. The ability to invest the down payment elsewhere — historically, index funds have returned 7–10%/year, which is competitive with housing appreciation in many markets.
You plan to stay 7+ years (long enough to recoup transaction costs and benefit from appreciation). Your local price-to-rent ratio is low (prices are reasonable relative to rents). You value stability and control over the property more than flexibility.