This phase III trial compares the effect of adding doxorubicin and ifosfamide (AIM chemotherapy) before (neoadjuvant) receiving standard treatment with pembrolizumab, radiation therapy and surgery to standard of care treatment alone in treating patients with high-risk soft-tissue sarcomas, such as undifferentiated pleomorphic sarcoma (UPS) or liposarcoma (LPS), that originate in the arms, legs (extremity) or torso (trunk wall) and can be removed by surgery (resectable). Doxorubicin comes from the bacterium Streptomyces peucetius. It damages deoxyribonucleic acid (DNA) and may kill tumor cells. It is a type of anthracycline antitumor antibiotic. Ifosfamide attaches to DNA in cells and may kill tumor cells. It is a type of alkylating agent and a type of antimetabolite. Immunotherapy with monoclonal antibodies, such as pembrolizumab, may help the body's immune system attack the tumor, and may interfere with the ability of tumor cells to grow and spread. Intensity-modulated radiation therapy (IMRT)is a type of 3-dimensional radiation therapy that uses computer-generated images to show the size and shape of the tumor. Thin beams of radiation of different intensities are aimed at the tumor from many angles. Giving neoadjuvant doxorubicin and ifosfamide with standard of care pembrolizumab, radiation therapy and surgery may be safe, tolerable, and/or more effective than standard of care therapy alone in treating patients with high-risk resectable soft tissue sarcoma of the arms, legs, or torso.