Lords warn leaving EU legal framework poses risks for cross-border cases