The problem for the UK government seems to rest in a choice between two unacceptable options. On one hand, they can treat Northern Ireland wholly as part of the mainland, implying the return of a hard border. On the other, they can treat Northern Ireland is treated differently from Great Britain, allowing for regualtory alignment with the Republic of Ireland. The UK government seemed posed to accept the latter, but it has been resolutely rejected by the DUP:
“We have been very clear. Northern Ireland must leave the EU on the same terms as the rest of the United Kingdom. We will not accept any form of regulatory divergence which separates Northern Ireland economically or politically from the rest of the United Kingdom.”
There is a third option. The United Kingdom has three devolved governments, each of which already has partial derogations from laws and rules which apply in England. If the British government accepted that there could be a derogation of rules for all three devolved governments, it would no longer be the case that Northern Ireland was being treated differently from the other parts of the United Kingdom. The precise scope of that derogation has to be considered, but the terms and management of the derogation could be delegated to Scotland, Wales and Northern Ireland to resolve. It’s called ‘devolution’.