"There is an apparently new iOS 18 security feature that reboots iPhones that haven’t been unlocked in a few days, frustrating police by making it harder to break into suspects’ iPhones
…
Apple added “inactivity reboot” code in iOS 18.1 that triggers iPhones to restart after they’ve been locked for four days"
A court order doesnt magically give them the unlock code, the court can hold a person in contempt for refusing to give it in some instances but not indefinitely.
Well surely the sentence for contempt of court must be fairly high, otherwise it would be a pretty useless law at all.