Owning a house only to rent it out is part of the problem here. You're adding to the scarcity of housing while being blessed with parents who can house you.
Given the current state of affairs, OP is doing the 'most logical' thing. If he sells his rental property, someone else will pick it up and rent it out.
The real problems are the rules that make it very difficult (practically impossible) to build high-density housing where it is needed and tax incentives that benefit owning multiple homes.
It’s a broken system but this is akin to telling people to solve global warming by making small individual choices: it doesn’t work and we need larger action at the top to force the change.
If they were just sitting on it, that would be reducing available housing.