if you are entitled to using a paid version for free (e. g. students, educators) you cannot opt-out of sharing your code.
That is incorrect. According to the page you linked elsewhere:
For individuals on non-commercial licenses: Data sharing is enabled by default, but you can turn it off anytime in the settings.
(Emphasis mine)
And for all other cases it's opt-in. No idea how you got from that that you cannot opt-out. It literally says the opposite.