Well this looks like a problem faced by most Samsung users after updating their phones. There is no exact way to fix this since Samsung is yet to release a fix to this issue.
But you can try this:
Change your lock, to swipe to unlock, which will delete your fingerprint data. Then set up your fingerprint lock again, rescanning your fingerprints like you did the first time you set your lock screen options.
I had/have the same issue after installing a backup of one A51 to another A51.
All runs fine, but the fingerprint.
Doing a factory reset -> fingerprint is OK and working.
Using the copy on the "wrong" phone -> fingerprint is NOT working
So it's no hardware issue, but I have not found a solution yet