I'm not seeing what makes SpaceX government funded beyond just that it provides services to the government? The same as any other launch provider would be doing? At this point the vast majority of SpaceX's activity, and likely cashflow, is from its mostly self-funded Starlink.
SpaceX won the original HLS contract because their design actually had hardware in testing, actually met NASA's payload, landing area and testing requirements, had a clear path to commercialization and was willing to cover most of the cost themselves, as otherwise NASA wouldn't have been able to choose anyone given the limited funding allocated by Congress.
Take away all of SpaceX‘s government contracts. You imagine SpaceX would still be in business?
As you said, every launch provider is basically dependent on government contracts to stay in business because the government is the only entity that has a legitimate need for launch capability such that it’s willing to pay for its development. There are no sufficiently profitable private contracts out there to sustain a launch provider.