Inclusion
Patients must have histologically confirmed sarcoma that is metastatic or unresectable and for which there is no known curative treatment
Patients must have histologic diagnosis of leiomyosarcoma (LMS) or selected soft tissue sarcomas (myxofibrosarcoma \[MFS\], undifferentiated pleomorphic sarcoma \[UPS\], synovial sarcoma, or dedifferentiated liposarcoma \[DDLPS\]). Pathology review and confirmation of diagnosis will occur at the site enrolling the patient on this study. If the pathology has previously been reviewed by another site participating in the study, the diagnosis does not need to be re-reviewed at the enrolling site
Patients must have evaluable disease that is amenable to biopsy
Patients must have been treated with at least 1 prior line of therapy. Prior anthracycline use is permitted as long as the cumulative dose prior to enrollment does not exceed 360 mg/m\^2
Age \>= 18 years. Because no dosing or adverse event data are currently available on the use of peposertib (M3814) in combination with liposomal doxorubicin in patients \< 18 years of age, children are excluded from this study
Eastern Cooperative Oncology Group (ECOG) performance status =\< 2 (Karnofsky \>= 60%)
Absolute neutrophil count \>= 1,500/mcL
Platelets \>= 100,000/mcL
Total bilirubin =\< 1.5 x institutional upper limit of normal (ULN)
Aspartate aminotransferase (AST) (serum glutamic-oxaloacetic transaminase \[SGOT\])/alanine aminotransferase (ALT) (serum glutamate pyruvate transaminase \[SGPT\]) =\< 3 x institutional ULN
Hemoglobin \>= 8 g/dL
Glomerular filtration rate (GFR) \>= 51 mL/min/1.73 m\^2 (per institutional estimate based on creatinine level)
Human immunodeficiency virus (HIV)-infected patients on effective anti-retroviral therapy with undetectable viral load within 6 months are eligible for this trial
For patients with evidence of chronic hepatitis B virus (HBV) infection, the HBV viral load must be undetectable on suppressive therapy, if indicated
Patients with a history of hepatitis C virus (HCV) infection must have been treated and cured. For patients with HCV infection who are currently on treatment, they are eligible if they have an undetectable HCV viral load
Patients with treated brain metastases are eligible if follow-up brain imaging after central nervous system (CNS)-directed therapy shows no evidence of progression and clinical symptoms are stable while off steroid support
Patients with a prior or concurrent malignancy whose natural history or treatment does not have the potential to interfere with the safety or efficacy assessment of the investigational regimen are eligible for this trial
Patients with known history of clinically significant cardiac disease, or current symptoms of cardiac disease, or history of treatment with cardiotoxic agents should have a clinical risk assessment of cardiac function using the New York Heart Association Functional Classification. To be eligible for this trial, patients should be class 2B or better
Female patients of childbearing potential must have a negative urine or serum pregnancy test within 72 hours prior to receiving the first dose of study medication. If the urine test is positive or cannot be confirmed as negative, a serum pregnancy test will be required
Female patients of childbearing potential must be willing to use an adequate method of contraception for the course of the study through 3 months after the last dose of peposertib (M3814) and 6 months after the last dose of liposomal doxorubicin
Male patients of reproductive potential must agree to avoid impregnating a partner while receiving study drug and for 3 months after the last dose of peposertib (M3814) and 6 months after the last dose of liposomal doxorubicin by complying with adequate methods of contraception
Note: Abstinence is acceptable if this is the usual lifestyle and preferred contraception for the patient
Ability to understand and the willingness to sign a written informed consent document. Participants with impaired decision-making capacity (IDMC) who have a legally-authorized representative (LAR) and/or family member available will also be eligible
Exclusion
Patients who have not recovered from adverse events due to prior anti-cancer therapy (i.e., have residual toxicities \> grade 1) with the exception of alopecia
Prior palliative radiotherapy within 14 days of cycle 1 day 1 and prior definitive radiotherapy within 42 days of cycle 1 day 1. Adverse effects of radiation therapy must resolve to baseline prior to cycle 1 day 1
Patients who are receiving any other investigational agents
History of allergic reactions attributed to compounds of similar chemical or biologic composition to peposertib (M3814) or other agents used in study
Patients who cannot discontinue concomitant medications or herbal supplements that are strong inhibitors or strong inducers of cytochrome P450 (CYP) isoenzymes CYP3A4/5, CYP2C9, and CYP2C19. Participants who cannot discontinue substrates with a narrow therapeutic index that are metabolized by CYP1A2, CYP2B6, CYP2C8, and CYP3A4/5 are ineligible. Patients may confer with the study doctor to determine if alternative medications can be used. The following categories of medications and herbal supplements must be discontinued for at least the specified period of time before the patient can be treated:
Strong inducers of CYP3A4/5 and CYP2C19: \>= 3 weeks prior to study treatment
Strong inhibitors of CYP3A4/5 and CYP2C19: \>= 1 week prior to study treatment
Substrates of CYP3A4/5 with a narrow therapeutic index: \>= 1 day prior to study treatment
Strong inhibitors of CYP2C9: \>= 1 week prior to study treatment
Patients who cannot discontinue concomitant proton-pump inhibitors (PPIs). Patients may confer with the study doctor to determine if such medications can be discontinued. These must be discontinued \>= 5 days prior to study treatment. Patients do not need to discontinue calcium carbonate
Patients with left ventricular ejection fraction (LVEF) measurement below the institutional lower limit of normal (LLN) are excluded
Patients with uncontrolled intercurrent illness
Patients who cannot swallow tablets whole
Patients with new or progressive brain metastases (active brain metastases) or leptomeningeal disease are not eligible
Pregnant women are excluded from this study because peposertib (M3814) is an adenosine triphosphate (ATP)-competitive inhibitor of DNA-protein kinase catalytic subunit (PKcs) with the potential for teratogenic or abortifacient effects. Because there is an unknown but potential risk for adverse events in nursing infants secondary to treatment of the mother with peposertib (M3814), breastfeeding should be discontinued if the mother is treated with peposertib (M3814). These potential risks may also apply to other agents used in this study
Patients may not have received prior treatment with a DNA-protein kinase (PK) inhibitor