Justin Welby and the Archbishop of York apologised for the way the church’s statement was released