Foreign secretary Ed Miliband and home secretary Shabana Mahmood are understood to be on opposing sides of the debate over whether or not the UK should reverse Brexit