Northern Ireland will remain part of UK customs territory, but it will also continue to align with the EU on specific trade regulations.