Civil servants hold ‘Remain bias’ and are stopping plans to ditch EU legislation, says Attorney General