Host prof stole my Ph.D. topic during my visit
As someone who has more than a bit of familiarity with the German system, I have to say that your story is a bit baffling to me. Being able to show prior results—particularly in the form of an existing peer-reviewed publication—would be of enormous benefit in getting a grant from the Deutsche Forschungsgemeinschaft (DFG), the national funding agency of Germany. Consequently, working with you and being a co-author on your publication would help, not hinder, the professor's grant application.

On the other hand, it is entirely possible that the professor may have thought that he could use an alternate approach to generate your results. While that may look like "stealing" your PhD project, that is actually not the case when different techniques are being proposed.

My recommendation for you would be to publish a high-quality paper out as quickly as possible. Once it's established in the literature, it's a lot harder for someone to claim credit for basically doing the same thing.