@arteteco To be boringly pragmatic, many corpses are used for medical students in their training. That's not science, but it would be a way to donate to similar positive outcome without furthering proprietary science. So, you could specify that you want your body used for education (and not for research).
But I like your original idea. Just say in your will that you want your body used for research *if* and only if it will be freely-licensed, otherwise use for non-research education.