Legislation passed following the EU membership referendum, including the United Kingdom Internal Market Act 2020, has undermined and restricted the authority of the devolved legislatures in both Scotland and Wales.