Testing the Addition of an Anti-cancer Drug, Elimusertib (BAY 1895344) ATR Inhibitor, to the Chemotherapy Treatment (Gemcitabine) for Advanced Pancreatic and Ovarian Cancer, and Advanced Solid Tumors

This phase I trial identifies the best dose, possible benefits and/or side effects of gemcitabine in combination with elimusertib (BAY 1895344) in treating patients with pancreatic, ovarian, and other solid tumors that have spread to other places in the body (advanced). Gemcitabine is a chemotherapy drug that blocks the cell from making DNA and may kill tumor cells. elimusertib may stop the growth of tumor cells by blocking some of the enzymes needed for cell growth. Giving gemcitabine and elimusertib in combination may shrink or stabilize cancer.

PRIMARY OBJECTIVES:

I. Evaluate the safety and tolerability of gemcitabine in combination with elimusertib (BAY 1895344), as assessed by Common Terminology Criteria for Adverse Events (CTCAE) 5.0. (Dose Escalation and Expansion Cohort) II. Determine the maximum tolerated dose (MTD) of gemcitabine in combination with elimusertib (BAY 1895344). (Dose Escalation Cohort)

SECONDARY OBJECTIVES:

I. To observe and record anti-tumor activity. II. Analyze the pharmacokinetic (PK) profile of the gemcitabine and elimusertib (BAY 1895344) combination.

III. Assessing whether immunohistochemical markers of deoxyribonucleic acid (DNA) damage, gamma-H2AX and phosphorylated (p)NBS1, increase in on-treatment biopsies compared to the levels seen in pre-treatment biopsies.

EXPLORATORY OBJECTIVES:

I. Explore biomarkers that predict response to this combination. II. Evaluate mechanisms of acquired resistance to this combination.

OUTLINE: This is a dose-escalation study of gemcitabine followed by a dose expansion study.

Patients receive gemcitabine intravenously (IV) over 30 minutes on days 1 and 8 and elimusertib orally (PO) once daily (QD) or twice daily (BID) on days 2-3 and 9-10. Cycles repeat every 21 days in the absence of disease progression or unacceptable toxicity. All patients also undergo medical imaging scans after cycle 2 and then every 9 weeks throughout the trial and collection of blood samples during screening and on days 1, 2, and 9-10 of cycle 1. Patients in the dose-expansion portion of the trial also undergo biopsies during screening and on day 9 of cycle 1.

After completion of study treatment, patients are followed up for 30 days.

Eligibility Criteria:
Inclusion Criteria:

* DOSE ESCALATION COHORT:
* Patients must have histologically confirmed solid tumor malignancy that is not curable with standard approaches. Gemcitabine must be considered a standard therapy for the participant's malignancy
* Patients must have a measurable disease, in at least one lesion, for both the dose escalation and expansion cohorts, as defined by Response Evaluation Criteria in Solid Tumors (RECIST) version (v)1.1
* Patients must have received one line of treatment for their incurable cancer before enrolling in this trial. Patients with rare malignancies for which there is no accepted standard chemotherapy regimen can enroll without any prior treatments
* Patients must not have received more than two lines of cytotoxic chemotherapy

  * Patients can have received prior gemcitabine
  * Adjuvant chemotherapy is counted as one line of treatment if patients received it within 6 months of their cancer recurring
  * There is no limit for lines of prior targeted therapies or immunotherapy
  * Patients who received a prior PARP inhibitor must have had progressive disease, or intolerable toxicity, on the PARP inhibitor prior to enrolling on the study
* DOSE EXPANSION COHORT:
* Participants must have a histologically confirmed advanced pancreatic adenocarcinoma or ovarian cancer (high grade serous ovarian, primary peritoneal or fallopian tube cancer) that is not curable with standard approaches. Patients with both metastatic pancreatic cancer and unresectable pancreatic cancer are eligible
* Ovarian cancer:

  * Patients with ovarian cancer must have platinum-resistant disease, defined as progression within 6 months after the last platinum regimen
  * Patients with ovarian cancer cannot have received more than one prior regimen in the platinum-resistance setting
* Pancreatic cancer:

  * Patients with pancreatic cancer cannot have received more than one line of cytotoxic chemotherapy in the metastatic setting

    * Adjuvant chemotherapy is not counted as one line of treatment, if patients received it more than 6 months prior to their cancer recurring
* Patients must have a biopsiable disease and at least one separate measurable lesion
* DOSE ESCALATION AND EXPANSION COHORTS:
* Eastern Cooperative Oncology Group (ECOG) performance status =\< 2 (Karnofsky \>= 60%)
* Age \>= 18 years

  * Because no dosing or adverse event data are currently available on the use of elimusertib (BAY 1895344) in combination with gemcitabine in patients \< 18 years of age, children are excluded from this study
* Leukocytes \>= 3,000/mcL
* Hemoglobin \>= 10 g/dL (no red blood cell transfusion is allowed within 3 weeks before starting the trial)
* Neutrophil count \>= 1,500 K/mcL (participants must not have received colony stimulating factors \[e.g., granulocyte colony-stimulating factor, granulocyte macrophage colony stimulating factor or recombinant erythropoietin\] within 3 weeks before initiation of protocol therapy)
* Platelets \>= 100,000 /mcL
* Albumin \>= 2.8 mg/dL
* Total bilirubin =\< 1.5 x institutional upper limit of normal (ULN)
* Aspartate aminotransferase (AST) (serum glutamic oxaloacetic transaminase \[SGOT\]) / alanine aminotransferase (ALT) (serum glutamic pyruvic transaminase \[SGPT\]) =\< 3 x institutional ULN
* Creatinine clearance =\< 1.5 x institutional ULN OR glomerular filtration rate (GFR) \>= 50 mL/min/1.73 m\^2
* 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 or primary brain tumors are eligible if follow-up brain imaging after central nervous system (CNS)-directed therapy shows no evidence of progression for \>= 4 weeks after the last date of treatment are permitted, and if they are no longer taking corticosteroids for at least 4 weeks prior to beginning the protocol
* 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 with permission of the principal investigator of the trial
* Patients with known history or current clinically significant 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
* The effects of elimusertib (BAY 1895344) on the developing human fetus are unknown. For this reason and because DNA-damage response inhibitor agents as well as other therapeutic agents used in this trial are known to be teratogenic, women of child-bearing potential and men must agree to use adequate contraception (hormonal or barrier method of birth control; abstinence) prior to study entry and for the duration of study participation and for 6 months after completion of elimusertib (BAY 1895344) administration. Should a woman become pregnant or suspect she is pregnant while she or her partner is participating in this study, she should inform her treating physician immediately. Men treated or enrolled on this protocol must also agree to use adequate contraception prior to the study, for the duration of study participation, and 6 months after completion of elimusertib (BAY 1895344) administration
* Ability to understand and the willingness to sign a written informed consent document

Exclusion Criteria:

* Patients cannot receive chemotherapy, targeted therapy or immunotherapy within 3 weeks of study entry
* Patients who have had radiotherapy within 4 weeks prior to entering the study
* 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 and lymphopenia
* Participants must not have received investigational therapy administered =\< 4 weeks or within a time interval less than at least five half-lives of the investigational agent, whichever is longer, before initiation of protocol therapy
* Participants with known untreated brain metastases are excluded from this clinical trial
* History of allergic reactions attributed to compounds of similar chemical or biologic composition to elimusertib (BAY 1895344) or gemcitabine
* Patients receiving any medications that are substrates of CYP3A4 with a narrow therapeutic window, or strong inhibitors/inducers of CYP3A4 are ineligible, if they cannot be transferred to alternative medication. Because the lists of these agents are constantly changing, it is important to regularly consult a frequently-updated medical reference. As part of the enrollment/informed consent procedures, the patient will be counseled on the risk of interactions with other agents, and what to do if new medications need to be prescribed or if the patient is considering a new over-the-counter medicine or herbal product
* Patients with uncontrolled intercurrent illness including but not limited to ongoing or active infection, symptomatic congestive heart failure, unstable angina pectoris, clinically significant cardiac arrhythmia, uncontrolled major seizure disorder, unstable spinal cord compression, superior vena cava syndrome or psychiatric illness/social situations that would limit compliance with study requirements are excluded
* Patients with psychiatric illness/social situations that would limit compliance with study requirements
* Pregnant women are excluded from this study because elimusertib (BAY 1895344) as a DNA-damage response inhibitor, and gemcitabine may have 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 elimusertib (BAY 1895344) breastfeeding should be discontinued if the mother is treated with elimusertib (BAY 1895344) and for 4 months after end of treatment. These potential risks may also apply to other agents used in this study
* Patients who have successfully undergone treatment for another, unrelated clinically relevant cancer, \>= 3 years post final treatment, are eligible to participate in this study
* Patients cannot have received radiation to more than 25% of their hematopoietically active bone marrow. Pelvic radiation is considered to affect 25% of the haematopoietically active bone marrow, and only one prior course of pelvic radiation is allowed (Hayman et al., 2011)
* Patients previously treated with an ATR inhibitor are excluded
* Participants who have undergone major surgery =\< 4 weeks before initiating protocol therapy must have sufficiently recovered from adverse events caused by the procedure, as judged by the treating investigator
* Subjects with a gastrointestinal disorder or malabsorption that could potentially affect the absorption of the study drug are excluded
* Participants with a history of a clinically relevant second primary malignancy within the past 2 years are excluded. Exceptions include resected basal and squamous cell carcinomas of the skin and completely resected carcinoma in situ of any type
* Patients not able to swallow tablets
* For the Dose Expansion Cohort, patients who cannot safely undergo tumor biopsies are excluded