The outcome being pursued by the prime minister in the Brexit trade talks will not avoid costly friction at the border