Copanlisib and Combination Chemotherapy for the Treatment of Relapsed or Refractory Diffuse Large B-Cell Lymphoma or Relapsed Grade 3b Follicular Lymphoma

This phase I trial studies the best dose of copanlisib when given together with combination chemotherapy (R-GCD) in treating patients with diffuse large B-cell lymphoma that has come back (relapsed) or does not respond to treatment (refractory) or grade 3b follicular lymphoma that has come back (relapsed) after 1 prior line of therapy. Copanlisib may stop the growth of tumor cells by blocking some of the enzymes needed for cell growth. Rituximab is a monoclonal antibody that may interfere with the ability of cancer cells to grow and spread. Drugs used in chemotherapy, such as gemcitabine, carboplatin, and dexamethasone, work in different ways to stop the growth of tumor cells, either by killing the cells, by stopping them from dividing, or by stopping them from spreading. Giving copanlisib together with R-GCD as second line therapy may improve the complete response rate for patients with diffuse large B-cell lymphoma or follicular lymphoma.

OUTLINE: This is a dose-escalation study of copanlisib.

Patients receive copanlisib intravenously (IV) and gemcitabine IV on days 1 and 8, carboplatin IV and rituximab IV on day 1, and dexamethasone orally (PO) or IV 30-60 minutes prior to chemotherapy on day 1 or PO in the morning (AM) and 30-60 minutes prior to chemotherapy on days 2-4. Patients also receive pegfilgrastim subcutaneously (SC) on day 8 or 9. Treatment repeats every 21 days for up to 3 cycles in the absence of disease progression or unacceptable toxicity.

After completion of study treatment, patients are followed for up to 1 year.

Eligibility Criteria:
Inclusion Criteria:

* Subjects must meet one of the following criteria:

  * Histologically confirmed relapsed/refractory DLBCL or grade 3b follicular lymphoma.
  * Follicular lymphoma that has relapsed within 2 years of primary therapy that included an anti-CD20 antibody in combination with chemotherapy as measured from the date of the last dose of chemotherapy
* Eastern Cooperative Oncology Group (ECOG) performance status =\< 2
* Previous exposure to other PI3K inhibitors (except copanlisib) is acceptable provided there is no resistance (resistance defined as no response \[response defined as partial response (PR) or CR\] at any time during therapy), or progressive disease (PD) after any response (PR/CR) or after stable disease within 6 months from the end of the therapy with a PI3K inhibitor
* Willingness and ability to comply with study and follow-up procedures, and give written informed consent
* Female subjects of childbearing potential must be surgically sterile, be post-menopausal (per institutional guidelines), or must have a negative pregnancy test within 3 days prior to cycle 1 day 1 and agree to use medically acceptable contraception throughout the study period and for 4 months after the last dose of either study drug. Men of reproductive potential may not participate unless they agree to use medically acceptable contraception throughout the study period and for 4 months after the last dose of either study drug
* Patients must be expected to receive at least 2 cycles of therapy
* Patients should have an expected survival if untreated of \>= 90 days
* Total bilirubin =\< 1.5 x upper limit of normal (ULN) (\< 3 x ULN for patients with Gilbert-Meulengracht syndrome or for patients with cholestasis due to compressive adenopathies of the hepatic hilum) (collected no more than 7 days before starting study treatment)
* Alanine aminotransferase (ALT) and aspartate aminotransferase (AST) =\< 2.5 x ULN (=\< 5 x ULN for patients with liver involvement by lymphoma (collected no more than 7 days before starting study treatment)
* Lipase =\< 1.5 x ULN (collected no more than 7 days before starting study treatment)
* Glomerular filtration rate (GFR) \>= 30 mL/min/1.73 m\^2 according to the Modification of Diet in Renal Disease (MDRD) abbreviated formula (collected no more than 7 days before starting study treatment). If not on target, this evaluation may be repeated once after at least 24 hours either according to the MDRD abbreviated formula or by 24 hour sampling. If the latter result is within acceptable range, it may be used to fulfill the inclusion criteria instead
* International normalized ratio (INR) =\< 1.5 and partial thromboplastin time (PTT) =\< 1.5 x ULN. PT can be used instead of INR if =\< 1.5 x ULN (collected no more than 7 days before starting study treatment)
* Platelet count \>= 75,000 /mm\^3. For patients with lymphomatous bone marrow infiltration, platelet count \>= 50,000 /mm\^3 (collected no more than 7 days before starting study treatment)
* Hemoglobin (Hb) \>= 8 g/dl (collected no more than 7 days before starting study treatment). Packed red blood cell transfusion or erythropoietin should not be given less than 7 days before the exam collection
* Absolute neutrophil count (ANC) \>= 1,000/mm\^3 (collected no more than 7 days before starting study treatment). For patients with confirmed lymphomatous bone marrow infiltration, ANC count \>= 750/mm\^3. Myeloid growth factors should not be given less than 7 days before the exam collection

Exclusion Criteria:

* More than one prior line of therapy for DLBCL
* More than one prior line of chemoimmunotherapy
* Prior treatment with copanlisib
* Documented evidence of resistance to prior treatment with idelalisib or other PI3K inhibitors defined as: No response (response defined as partial response \[PR\] or complete response \[CR\]) at any time during therapy, or Progression (PD) after any response (PR/CR) or after stable disease within 6 months from the end of the therapy with a PI3K inhibitor
* Prior treatment including systemic therapy or radiotherapy within 21 days of study initiation
* Poorly controlled diabetes mellitus defined as hemoglobin A1c \> 8.5%
* Known lymphomatous involvement of the central nervous system
* Known history of human immunodeficiency virus (HIV) infection. All patients must be screened for HIV up to 28 days prior to study drug start using a blood test for HIV according to local regulations
* Hepatitis B (HBV) or C (HCV) infection. All patients must be screened for HBV and HCV up to 28 days prior to study drug start using the routine hepatitis virus laboratorial panel. Patients 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), these patients should receive prophylactic antiviral therapy. Patients positive for anti-HCV antibody will be eligible if they are negative for HCV-ribonucleic acid (RNA)
* Previous or concurrent history of malignancies within 3 years prior to study. Any exceptions beyond those listed below must be approved by the principal investigator:

  * Cervical carcinoma in situ
  * Non-melanoma skin cancer
  * Superficial bladder cancer (Ta \[non-invasive tumor\], Tis \[carcinoma in situ\] and T1 \[tumor invades lamina propria\])
  * Localized prostate cancer
* Active, clinically serious infections (\> Common Terminology Criteria for Adverse Events \[CTCAE\] grade 2)
* Known hypersensitivity to any of the study drugs, study drug classes, or excipients in the formulation.
* Proteinuria of \>= CTCAE grade 3 as assessed by a 24 hour (h) total urine protein quantification or estimated by urine protein: creatinine ratio \> 3.5 on a random urine sample
* Unresolved toxicity from prior therapy higher than National Cancer Institute (NCI)-CTCAE grade 1 attributed to any prior therapy/procedure excluding alopecia or sensory neuropathy. Concurrent diagnosis of pheochromocytoma
* Pregnant or breast-feeding patients. Women of childbearing potential must have a pregnancy test performed a maximum of 7 days before start of treatment, and a negative result must be documented before start of treatment
* Substance abuse, medical, psychological or social conditions that may interfere with the patient's participation in the study or evaluation of the study result
* Congestive heart failure \> New York Heart Association (NYHA) class 2
* Unstable angina (angina symptoms at rest), new-onset angina (begun within the last 3 months)
* Myocardial infarction less than 6 months before start of test drug
* Uncontrolled arterial hypertension despite optimal medical management (per investigator's assessment)
* Arterial or venous thrombotic or embolic events such as cerebrovascular accident (including transient ischemic attacks), deep vein thrombosis or pulmonary embolism within 3 months before the start of study treatment
* Non-healing wound, ulcer, or bone fracture
* Active, clinically serious infections \> CTCAE grade 2
* Patients with seizure disorder requiring medication
* Patients with evidence or history of bleeding diathesis. Any hemorrhage or bleeding event \>= CTCAE grade 3 within 4 weeks prior to the start of study treatment
* Any illness or medical conditions that are unstable or could jeopardize the safety of the patients and their compliance in the study
* History of having received an allogeneic bone marrow or organ transplant
* Anti-arrhythmic therapy (beta blockers or digoxin are permitted)
* Major surgical procedure or significant traumatic injury (as judged by the investigator) less than 28 days before start of treatment, open biopsy less than 7 days before start of treatment
* Systemic continuous corticosteroid therapy at a daily dose higher than 15 mg prednisone or equivalent is not allowed. Patients may be using topical or inhaled corticosteroids. Previous corticosteroid therapy must be stopped or reduced to the allowed dose at least 7 days performing the screening computed tomography (CT)/magnetic resonance imaging (MRI). If a patient is on chronic corticosteroid therapy, corticosteroids should be de-escalated to the maximum allowed dose before the screening. Patients may be using topical or inhaled corticosteroids
* Use of CYP3A4 inhibitors and inducers. Copanlisib is primarily metabolized by CYP3A4. Therefore, concomitant use of strong inhibitors of CYP3A4 (e.g., ketoconazole, itraconazole, clarithromycin, ritonavir, indinavir, nelfinavir and saquinavir), and strong inducers of CYP3A4 (e.g., rifampin, phenytoin, carbamazepine, phenobarbital, St. John's wort) are not permitted from day -14 of cycle 1 until the safety follow-up visit