Stripped out, yes. Replaced, not necessarily. If ACCESS had been interested in opening BeOS source code they could have provided just the parts they own, omitting the licensed modules and libs. The resulting code would be non-buildable, but I don’t think anyone would be particularly concerned about that. Nowadays it’s more of a historical interest than a practical application.
But even if it’s just the removal of the licensed modules your point about the costs still stands. In the post GoBe Productive on Haiku - #99 by Stacked_Lambda there’s an info on how much GoBe asked for cleaning up the source code and releasing it into the open source world, it was around $200’000