Are you unable to package Windows projects in UE5? Fear not, I have a solution for you!

I had the same issue too. I have tried all of the above and still nothing happened. I updated my graphics card drivers and restart the computer and fixed.