1. Relatively few editors would have scruples about assigning your story idea to someone else. That happens sometimes even among staff writers, because editors typically think that execution matters more, since story ideas usually are a dime a dozen and take little effort.
2. Possibilities as far as pitching protectively: Try to think like an editor.
Generally, they focus on getting the best piece they can, with as little effort and risk as possible. That means for instance they prefer to use freelancers (or staffers) they’ve previously worked with, who are reliable and who produce work that’s turnkey or close to it; who aren’t resistant to or defensive about editing; and who aren’t otherwise challenging to work with. For instance, if you’re hard to reach, that introduces more risk for the editor, because maybe the piece will miss deadline, and you’ll generally create more effort or stress for them.
That means for instance if you’re new to them, you’ll have better odds if your work samples are strong and relevant; you know people whom the editors respect, who’ll vouch for you; you have work samples from larger media outlets / outlets with high standards.
Basically, whatever you can reasonably offer to lower risks or friction helps you land work.
You could try to start a relationship with a piece written on spec, but that of course is a bet that you’d be making, staking your time and effort. And if you take that route, I’d suggest that you first familiarize yourself with what the outlet publishes, so that whatever you produce can be as close to possible when it comes to quality, voice and tone, maybe focusing on the relevant audience’s needs or preferences, etc.
Along similar lines, if an editor does give you a shot, do the above so that you file copy that requires little cleanup. In some cases, that can include good notes or links to sources, if anything in your piece needs fact-checking.
You also might want to consider pitching simpler pieces first, or with sources well thought out. That can give editors the chance to assign you a story with less risk. Like if you pitch a complex or legally messy piece and they’ve not worked with you (or you don’t have a strong track record that they can vet), you’re less likely to get such assignments from better outlets.
Of course, you stand a likelier chance of landing work at lesser outlets and building work samples, so you can climb your way to better outlets. But the trade-off then, if you’re greenish, is that your pieces might not be strong when you produce them and you might not get great editing and learn much.
Basically, there’s no silver bullet for what you asked about. But good freelancers are tough to find, most editors would tell you. That’s because reliability, quality work, healthy collaborative skills and such aren’t a common combo. The freelancers I know with that get a lot of work and referrals, and are often booked months out.