It could be argued that, if the economy works in a non-hierarchical way, there are less difficulties to break down some forms of historical social discrimination. This is because, if wealth has historically accumulated in the hands of some white people (for example), those rich people might want to promote racist divisions to frame social issues in a way that their excessive wealth and power doesn't receive much attention. However you're absolutely correct in that ending capitalism is not a guarantee to solve sexism, racism, homophobia or ableism. You can look at historical examples of genuine attempts to achieve socialism, such as 1938 Catalonya, and while you might find them more socially progressive than their contemporary neighbours, we wouldn't say that they had views on gender equality particularly impressive to today's eyes.
Pollution is a somewhat different issue. Due to capitalism's need to constantly expand (lest it degenerates into feudalism), it is going to constantly fight any and all attempts to regulate the exploitation of natural resources, and a lot of society is going to feel incentivized to go along with it because it looks like a good short-term solution to economic emancipation to a lot of people. Still, you could also end capitalism and find that the system you replace it with still has difficulties to curtail pollution, due to different reasons.
It could be argued that, if the economy works in a non-hierarchical way, there are less difficulties to break down some forms of historical social discrimination. This is because, if wealth has historically accumulated in the hands of some white people (for example), those rich people might want to promote racist divisions to frame social issues in a way that their excessive wealth and power doesn't receive much attention. However you're absolutely correct in that ending capitalism is not a guarantee to solve sexism, racism, homophobia or ableism. You can look at historical examples of genuine attempts to achieve socialism, such as 1938 Catalonya, and while you might find them more socially progressive than their contemporary neighbours, we wouldn't say that they had views on gender equality particularly impressive to today's eyes.
Pollution is a somewhat different issue. Due to capitalism's need to constantly expand (lest it degenerates into feudalism), it is going to constantly fight any and all attempts to regulate the exploitation of natural resources, and a lot of society is going to feel incentivized to go along with it because it looks like a good short-term solution to economic emancipation to a lot of people. Still, you could also end capitalism and find that the system you replace it with still has difficulties to curtail pollution, due to different reasons.