As someone who hasn't been in the Mac ecosystem since his and his mom's iMac both broke in the same way in high school, how does the Mac ecosystem lock you in?
Comment just above mentions the need to use macs because of xcode.
As far as I know you need to use Xcode to distribute the software, or to write macOS-native software. I have written plenty of Java Swing apps without touching Xcode at all.