Start by checking what is returned by the call - I'm guessing it's False indicating the decryption didn't happen.
And if I had to guess why, I'd start by looking at the actual parameters it expects and you give it:
CryptUnprotectData function (dpapi.h) - Win32 apps | Microsoft Learn[
^] - you are passing the same data blob as both input and output and I suspect that that would very likely be a problem.