Inclusion Criteria:  DOSE ESCALATION: Patients must have a pathogenic or likely pathogenic germline or somatic defect as determined by local assessment and classification in at least one of the following:  Defect in one or more DNA Damage Response (DDR) genes such as: ATM (including ATM protein loss by IHC), ATRX, ARID1A, BARD1, BRCA1, BRCA2, BRIP1, CDK12, CHEK2, FANCA, FANCC, FANCD2, FANCE, FANCF, FANCM, MRE11A, MSH2, NBN, PALB2, RAD51, RAD51B, RAD51C, RAD51D, or other related genes at the discretion of the principal investigator in consultation with the MD Anderson Cancer Center Institute for Personalized Cancer Therapy Precision Oncology Decision Support (PODS) group OR PIK3CA hotspot and PTEN mutations  DOSE EXPANSION: Patients must have a pathogenic or likely pathogenic germline or somatic defect as determined by local assessment and classification  Cohort A: ATM deleterious mutation or loss of ATM expression Cohort B: Actionable PIK3CA hotspot and PTEN mutations Patients must have histological diagnosis of locally advanced (primary or recurrent) or metastatic solid tumors (except primary central nervous system [CNS] tumors), that are not amenable form treatment with curative intent or who have refused or are intolerant of standard therapy Availability of a fresh or recent tumor tissue sample from a diagnostic biopsy/surgery or a metastatic tumor biopsy; the sample must have been obtained with 12 months prior to study enrollment. When only bone disease is present, an archival tumor tissue sample obtained within 5 years prior to study enrollment may be accepted for non-prostate cancer patients and a fresh bone biopsy may be accepted for prostate cancer patients only Patients must be >=18 years of age Patients must have measurable disease by Response Evaluation Criteria in Solid Tumors (RECIST) version (v)1.1; or patients may have bone only metastatic disease evaluable by Prostate Cancer Working Group 3 (PCWG3) for subjects with metastatic castration-resistant prostate cancer (mCRPC), or according to the tumor evaluation criteria best suited and accepted for the tumor type being evaluated Eastern Cooperative Oncology Group (ECOG) performance status (PS) 0 or 1 Absolute neutrophil count (ANC) >= 1,500/mcL. Platelets >= 150,000 / mcL Hemoglobin >= 10 g/dL without dependence on erythropoietin support or blood product support Participants must not have received a transfusion (platelets or red blood cells) within 28 days of the first dose of study intervention. Participants must not have received administration of granulocyte colony-stimulating factor, erythropoietin, or thrombopoietic treatments within 14 days of the first dose of study intervention. Hemoglobin (Hb) value must be met without erythropoietin dependency Serum creatinine =< 1.5 x upper limit of normal (ULN) OR measured or calculated creatinine clearance (glomerular filtration rate [GFR] can also be used in place of creatinine or CrCl) >= 60 mL/min for subject with creatinine levels > 1.5 x institutional ULN Creatinine clearance can be estimated according to the Cockcroft-Gault formula Serum total bilirubin =< 1.5 x ULN OR direct bilirubin =< ULN for subjects with total bilirubin levels > 1.5 x ULN Aspartate aminotransferase (AST) and alanine aminotransferase (ALT) =< 2.5 x ULN OR =< 5 x ULN for subjects with liver metastases International normalized ratio (INR) or prothrombin time (PT) =< 1.5 x ULN unless subject is receiving anticoagulant therapy as long as PT or partial thromboplastin time (PTT) is within therapeutic range of intended use of anticoagulants Activated partial thromboplastin time (aPTT) =< 1.5 x ULN unless subject is receiving anticoagulant therapy as long as PT or PTT is within therapeutic range of intended use of anticoagulants Patients must be >= 2 weeks beyond treatment with any chemotherapy or other investigational therapy to include hormonal, biological, or targeted agents; or at least 5 half-lives from hormonal, biological, or targeted agents, whichever is shorter at the time of treatment initiation Women of childbearing potential MUST have a negative serum or urine HCG test unless prior tubal ligation (>= 1 year before screening), total hysterectomy or menopause (defined as 12 consecutive months of amenorrhea). Patients should not become pregnant or breastfeed while on this study. Sexually active patients must agree to use dual contraception for the duration of study participation and for 120 days after Ability to understand and willingness to sign informed consent form prior to initiation of the study and any study procedures Willing and able to comply with scheduled visits, treatment plan, laboratory tests, and other study procedures Any medical condition or diagnosis that would likely impair absorption of an orally administered drug (e.g. gastrectomy, ileal bypass, chronic diarrhea, gastroparesis) Inability to comply with the study and follow-up procedures  Exclusion Criteria:  Inability or unwillingness to swallow pills Active infection requiring intravenous (IV) antibiotics or other uncontrolled intercurrent illness requiring hospitalization. Minor infections, e.g. periodontal infection or urinary tract infection (UTI), which may be treated with short term oral antibiotics are allowed History of cerebrovascular accident (CVA), myocardial infarction or unstable angina within the previous 6 months before starting therapy Has a known additional malignancy that is progressing or requires active treatment. Exceptions include basal cell carcinoma of the skin, squamous cell carcinoma of the skin that has undergone potentially curative therapy or in situ cervical cancer Has a known psychiatric or substance abuse disorders that would interfere with cooperation with the requirements of the trial Has known active central nervous system (CNS) metastases and/or carcinomatous meningitis. Subjects with previously treated brain metastases may participate provided they are stable (without evidence of progression by imaging (as determined by magnetic resonance imaging [MRI] or computed tomography [CT]) for at least four weeks prior to the first dose of trial treatment and any neurologic symptoms have returned to baseline) and have no evidence of new or enlarging brain metastases. Subjects with previously treated brain metastases may participate provided they are stable (without evidence of progression by imaging for at least four weeks prior to the first dose of trial treatment and any neurologic symptoms have returned to baseline), have no evidence of new or enlarging brain metastases, and are not using steroids > 10mg or equivalent of prednisone for at least 7 days prior to trial treatment. This exception does not include carcinomatous meningitis which is excluded regardless of clinical stability Patients with uncontrolled Type I or II diabetes mellitus (DM); uncontrolled DM is defined as hemoglobin A1c (HbA1c) > 8.5% and a fasting blood glucose of > 120 mg/dL within 14 days prior to trial entry Patients with congestive heart failure > New York Heart Association (NYHA) Class 2, unstable angina, or uncontrolled hypertension despite optimal management Patients with history or concurrent condition of interstitial lung disease or any severity and/or severely impaired lung function Patients with prior anti-cancer therapy within 2 weeks prior to study enrollment or prior radiation therapy within 2 weeks prior to study enrollment. Prior palliative radiotherapy to metastatic lesion(s) is permitted, provided it has been completed at least 2 days prior to study enrollment and no clinically significant toxicities are expected (e.g. mucositis, esophagitis) Patients who have undergone major surgery and have not recovered prior to study enrollment Patients who have a known prior severe hypersensitivity to investigational products or any component in their formulations Patients with persisting toxicity related to prior therapy (National Cancer Institute [NCI] Common Terminology Criteria for Adverse Events [CTCAE] v5.0 grade > 1). However, alopecia and sensory neuropathy grade =< 2, or other grade =< 2 adverse events not constituting a safety risk, based on the investigator's judgement, are acceptable  All participants must be screened for hepatitis B virus (HBV) and hepatitis C virus (HCV) up to 28 days prior to start of study intervention, using the routine hepatitis virus laboratorial panel.  Participants positive for hepatitis B surface antigen (HBsAg) or hepatitis B core antibody (HBcAb) will be eligible if they are negative for HBV deoxyribonucleic acid (DNA); participants positive for anti-HCV will be eligible if they are negative for HCV ribonucleic acid (RNA) Patients who have received external beam radiation therapy (EBRT) to > 50% of the total body reserve of active bone marrow mass involvement. This may be difficult to quantify and will be left to physician discretion Positive cytomegalovirus (CMV) polymerase chain reaction (PCR) test at baseline  Pregnant female patients; breastfeeding female patients; fertile male patients; and female patients of childbearing potential who are unwilling or unable to use 2 methods of contraception for the duration of the study and for at least 120 days after the last dose of study drugs for female patients or 120 days after the last dose of study drugs for male patients, whichever is later for the individual patient. Highly effective methods of contraception are those that alone or in combination, result in a failure rate of less than 1% per year when used consistently and correctly. These methods include:  Established use of oral, inserted, or injected or implanted hormonal methods of contraception are allowed provided the patient remains on the same treatment throughout the entire study and has been using that hormonal contraceptive for an adequate period of time to ensure effectiveness Correctly placed copper containing intrauterine device (IUD) Male condom or female condom used with spermicide (i.e. foam, gel, film, cream or suppository) Male sterilization with appropriately confirmed absence of sperm in the post-vasectomy ejaculate Bilateral tubal ligation or bilateral oophorectomy