This study will test the recommended dose of AZD5363 (recommended from a previous phase 1 study of the drug) in patients with specific AKT mutations. In patients who have ER positive breast cancer with an AKT mutation, they will also be receiving a standard breast cancer drug called fulvestrant that is given as an injection. In patients who have prostate cancer with an AKT mutation, they will also be receiving a standard prostate cancer drug called enzalutamide that is taken orally.