Shopify has recently (21st January 2023) made some changes to how Refunds are processed using the Shopify Payments method. There is now a delay of 24 hours from submitting the refund to it actually being processed. This has made things very confusing because the status of the order does not update for 24 hours either.
Shopify Payments now places a refund in a "Pending" state for 24 hours before it is processed. The 24 hour delay also applies to the customer refund notification email being sent and updates to the Order page showing the refund.
Further details on the issue can be found here.
After the refund has been submitted, the Order page removes the refund amount from the total but it does not mark the order as refunded till after the 24 hours. This can be very confusing! Please see the examples below - which are totally normal after submitting the refund!
After 24 hours, these sections of the Order page will update to show the Refund correctly and the refund notification email will be sent to the customer. The order will also be marked as "Refunded" or "Partially refunded".