having thousands of dollars invested in a platform doesn't force you to stick with the platform. you still have a choice. it's painful, but not impossible to switch.
it's not really different than moving to a city and investing time and resources building connections with the local community, but then a city enacts a dumb law you don't like so now you have to either stay and live with it or move and give up your connections.
and it sounds to me you should have researched more into the platform 15 years ago before choosing. apple has always locked iPhone down tightly. this shouldn't be a surprise to you.