It is an established principle of international law that a state is obliged to discharge its treaty obligations in good faith. This is, and will remain, the key principle in informing the UK’s approach to international relations. However, in the difficult and highly exceptional circumstances in which we find ourselves, it is important to remember the fundamental principle of parliamentary sovereignty.
Parliament is sovereign as a matter of domestic law and can pass legislation which is in breach of the UK’s Treaty obligations. Parliament would not be acting unconstitutionally in enacting such legislation. This ‘dualist’ approach is shared by other, similar legal systems such as Canada, Australia and New Zealand. Under this approach, treaty obligations only become binding to the extent that they are enshrined in domestic legislation. Whether to enact or repeal legislation, and the content of that legislation, is for parliament and parliament alone. This principle was recently approved unanimously by the supreme court in R (Miller) v Secretary of State for Exiting the European Union  UKSC 5.
The legislation which implements the withdrawal agreement including the Northern Ireland protocol is expressly subject to the principle of parliamentary sovereignty. Parliament’s ability to pass provisions that would take precedence over the withdrawal agreement was expressly confirmed in section 38 of the European Union (Withdrawal Agreement) Act 2020, with specific reference to the EU law concept of ‘direct effect’.