If you make a TWRP backup, you have to choose the partitions TWRP should backup for you.
If TWRP can’t decrypt the data partition, you can’t select it for the backup, this way you can only select partitions to backup which TWRP can also restore without having access to the data partition.
So backing up and restoring the state of the OS will work.
For backing up and restoring App data and everything in Internal Storage (which is the /data/media folder in the data partition) you would have to use other means.