I encountered this exact issue with WooCommerce 5.4.0, updating to 5.4.1 resolved it for me.
I’ll echo @abuzon — I was experiencing the exact same issue with 5.4.0 and updating to 5.4.1 resolved it for me.
I was having the exact same issue using WooCommerce 5.4.0 & Authorize.net in both test and production modes. Updating WooCommerce to 5.4.1 resolved the issue for me.