Britain came close to leaving the European Union without a trade deal under Boris Johnson’s leadership