Since about Android 6 all devices come with enabled user data encryption. I think since about Android 8 Google enforces that this encryption is hardware backed, which means you can’t export the used encryption key and once the key has been deleted all data are gone forever.
These measures have been introduced to protect user data e.g. of a stolen device. Unless the thief knows the unlock code the device does not allow user data access.
There were a few cases were you could trick the lock screen to bypass it, however this only affects devices that were already running. If you boot the device you need to provide the lock screen PIN/password/pattern otherwise the user data encryption key is not released (the exact way this works was changed with every Android version a bit).
From the device perspective you are not the device owner unless you have authenticated using the required password/PIN/pattern. Therefore it now protects the data from any access.
There is no way to bypass this protection, otherwise a thief could do the same and in the get access to your data:
rooting: Requires an bootloader unlocked device or for an device with a vulnerability access to the UI is required. Unlocking a bootloader locked device automatically performs a factory reset which deletes the encryption key -> data gone. And that you don’t have UI access to the device is obvious.