I don't have any examples in mind, but am sure it happens. But I'm also sure it is rare. The opportunities for it are rare, actually, and most people are honest and willing to give credit.
You will find a few examples on this site where it is charged, but some of them result from misunderstandings. For it to occur person A has to do something worth publishing and somehow communicate it to B but not much farther. Even that is rare.
There is parallel work, of course, but that isn't stealing. If you do something significant and put it in a drawer (Like Newton did) and someone else (Leibniz) later publishes something close to it, then it isn't stealing.
The one situation that gets charged is when a student does something that a professor later publishes without attribution. Some of these charges are valid, but not all. Sometimes the work was begun but not finished and some ideas just "floated around" for a while until someone else finished them. But sometimes the bad thing happens since not everyone is honest and some are desperate.
The comic in me wants to suggest that the opposite situation of the ideas of a professor being published by a student is just called "A doctoral thesis". But attribution is normally given even there. And the student does contribute substantially in almost all cases.
Note that the statement of a "theorem" without a proof is just a statement, not a theorem, and is usually worth very little other than a goad. There are some well known exceptions w.r.t. "value" (Riemann Hypothesis), but resolution of those isn't thought of a stealing in any sense.
But if you are worried about it, then either work in private and publish soon after you have something significant, or else, share your preliminary ideas widely and seek collaboration. Either of those protect you. Over time, the trend has been from the first solution toward the second.
And also, be careful in your own work to give acknowledgement about the source of things even if it was incomplete when you first learned of it.
And note, that "ideas" can't be "stolen" since they aren't "property". But the origin of ideas should be attributed whenever possible.