The Albanese government has suffered a new blow after a court ruled monitoring provisions for former immigration detainees was unconstitutional.