Welcome back to the Wefugees Community and thank you for your question.
As far as I know, there is unfortunately no legal foundation to receive a residence permit in Germany through owning/investing in Real Estate as such. Only if combined, for example, with self-employment activities, there might be options. But I am not an expert on this.
Maybe other community members can contribute some more information or share experience.
All the best,