For purposes of buying a home, it makes the most sense if you have children here because you can get permanent residency on that basis; it gives you strong footing because your children can't divorce you. And your kids need a place to live.
You can get PR from marriage, but in the event of divorce, it seems you can lose your PR status. Marriage alone, is a less good reason. If you've been in a stable marriage for 10 years or so, then it makes more sense.
Indeed, Ukraine's cumbersome residency permit system and Ukraine's desire to sell land and homes to foreigners don't harmonize well together.
If you're on the 90-days in, 90-days out program; then buying makes little sense because of the availability of cheap rentals and the cost of upkeep for a home that you will not be in 1/2 of the year.
If you get the 1 year TRP, and have a real possibility to renew it with little hassle and little cost, then owning your own place starts to make more sense because it's good to have a bit of the earth to structure your life rather than living like a perpetual tourist. Unfortunately, there is hassle and cost involved in renewing the TRP on a yearly basis. If the TRP was granted for every 2 or 3 years, it would make more sense.
For most people, bringing money to Ukraine for the sole purpose of investing in Ukraine makes absolutely no sense whatsoever because the economic system is highly regulated against competitors and structured to avoid prosperity. Simply put, for most people Ukraine is not a place to bring their money in the hopes of making more money.