this is on civicrm 5.39.0 on wordpress 5.8. I have a wordpress page https://bbsadev.douglasscloud.co.uk/payment-process-bacs/ with Contribution shortcode [civicrm component="contribution" id="2" mode="test" hijack="1"] inside (the Contribution uses 'Pay later option'). When I submit it and it goes to the thank you page - https://bbsadev.douglasscloud.co.uk/payment-process-bacs/?civiwp=CiviCRM&q=civicrm%2Fcontribute%2Ftransact&_qf_ThankYou_display=1&qfKey=CRMContributeControllerContribution63et55wzn1oogc0ws0wgsosswk8sgo44kgs0kow0co404004w0_6128 - it just shows the shortcode (see the screenshots). This happened since I've updated civicrm from 5.29.0 -> 5.39.0 on wordpress.
This is a regression, that came with 5.39.0 and breaks the civicrm interaction pages in some situations.
The good news: The problem is solved with CiviCRM 5.40.1
Good luck! Detlev