It’s always a contest between security tools and penetration tools. The problem comes when law enforcement can do this without fair protections of privacy, say if they can easily establish probable cause ( My detection dog is signalling you have illegal data on your phone ) or they are allowed to get a warrant post-hoc for an otherwise illegal search.
…Or they do the illegal search and then engage in parallel reconstruction e.g. make a fake story about following up on an informant.
Once the police just seize and crack your phone on a whim, then the state no longer respects your privacy and autonomy, which means you can no longer consent to be governed, rather are controlled by gunpoint (surveillance and use of force). This is one of the critical ingredients to autocratic rule, since it does a lot to neuter the capacity of discontent turning into revolt.