After following the instructions stated here https://shopify.dev/api/liquid/tags/theme-tags#form-return-to, I amended the login form code to the following:
{%- form 'customer_login', novalidate: 'novalidate', return_to: routes.root_url -%}
however it still defaults to returning the customer to their account page once successfully logged in. Can anyone explain how to fix this issue please?