Pretty much the only way to win it so make something that provides marginal revenue, which makes reimplementation not worth it for the giant (but potentially worth it for you). I suspect a lot of Unity and Unreal plugins and authoring tools reside in that niche.
BTW I worked in a startup once and a guy, who was developing opensource plugin for our product, applied for a job with us. The owner (a known blogger BTW) said "Why hire him if he's already working for us?"
Not only you had a person that already knew much more about your product than the average potential hire, but a person that probably was interested in your product (and maybe knew what users wanted) too.
Because you do not want him to abandon the project if it is useful to you?
This is what most dating apps do, except Tinder (trying to do a clustering in an n-dimensional space). That Tinder outclasses most other dating apps is proof that your approach wont work. We don't look for people with similar interests for dating. Unfortunately we don't chose who or what we like in a partner.
current Tech giants are need to be replaced
There's no reason their replacement will be any more moral. They should be dismantled imho.
Patents are fundamentally broken and really don't work like most think or want them to.
It was working fine for a week or so before Facebook caught up and revoked my API keys (effectively killing the app). They didn't give any reason besides some vague recommendation to review their Terms of Service. A few months later at their F8 developer conference they announced they'll be launching their own matchmaking service which will work pretty the same way I built my app.
Moral of the story: never trust big tech.
P.S. I open sourced the app a few years ago: https://bitbucket.org/stonepillarstudios/workspace/projects/... Feel free to fork & revive.