Plagiarism of Research Proposal Idea by Potential Supervisors
I understand and completely share your frustration here. It feels awful when your application is rejected but later the same idea is used by a person you put some of your trust in.

I don't have a universal answer which helps to avoid such things. Sometimes people suggest to be vague in your proposal, but I don't think this is really a good idea. After all, when you have an idea, and you think it is good, you don't want to sound like you don't know what you're talking about. So, I don't think you should somehow tweak your proposal to make it less easy to plagiarise.

Instead, I would suggest to maybe do better research of potential supervisors before you send them your detailed proposal. Perhaps, do a small polite exchange of emails and check if they are even interested to have another PhD/postdoc at this moment? Look at their history of publications, read a few papers - are they really working in the area you want to work in? Look at author's lists - is there evidence that a potential supervisor  was a guest/gift author in many papers? Are there cases when they re-claim someone else's idea as their own (by doing minor modifications and changing the name, etc.) If possible, get in touch with their current postdocs/PhDs and check what they think about the transparency and ethics of the research/publication process in their group. Or simply try to arrange a small chat with the potential supervisor - sometimes five minutes face-to-face tell you more about a person than a year of email exchanges. 

Good luck.