Optimal control to reach eco-evolutionary stability in metastatic castrate-resistant prostate cancer