This phase II/III trial studies how well the addition of ivonescimab to standard chemotherapy (gemcitabine and cisplatin) works when compared to usual chemotherapy and immunotherapy (durvalumab or pembrolizumab) in treating patients with biliary tract cancer that may have spread from where it first started to nearby tissue, lymph nodes, or distant parts of the body (advanced). Gemcitabine is a chemotherapy drug that blocks the cells from making deoxyribonucleic acid (DNA) and may kill tumor cells. Cisplatin is in a class of medications known as platinum-containing compounds. It works by killing, stopping or slowing the growth of tumor cells. Immunotherapy with monoclonal antibodies, such as durvalumab and pembrolizumab, may help the body's immune system attack the cancer, and may interfere with the ability of tumor cells to grow and spread. Ivonescimab is a bispecific antibody that is directed against both the programmed cell death protein 1 (PD-1) and vascular endothelial growth factor (VEGF) protein. By targeting PD-1, ivonescimab may help the body's immune system attack the cancer, and may interfere with the ability of tumor cells to grow and spread. By targeting VEGF, ivonescimab may help stop the formation of blood vessels that bring oxygen and nutrients to tumor. Adding ivonescimab to standard chemotherapy may work better than usual chemotherapy and immunotherapy in lowering the chance of advanced biliary tract cancer growing or spreading.