I found the solution, at least for me.
The problem needs to be fixed on the target / backup TrueNAS instance, not in the replication settings of the source instance.
After the datasets have been created by the replication task on the target system, you need to go into the “ZFS Encryption” settings on the target system and enable the " Inherit encryption properties from parent " checkbox.
After I did that for all the child datasets on the target instance, they could all be unlocked by unlocking the parent dataset on the target instance.
This did still work even after subsequent replication tasks (so this setting was not reverted / overwritten again).
Not sure if this would also be a solution for @swc-phil as my problem was with child datasets not inheriting the encryption settings after they have been replicated.
if you only have one dataset, there should be nothing to inherit.
