Even after a successful login, customer
remains null
on the storefront.
This issue has been reported by multiple developers. A similar case was discussed in the following topic on the Shopify Community forum:
It appears to be a platform-side session inconsistency or limitation.