Many middle-income countries are left out of the agreement, widening the gap in access to critical medicines.