The issue has been resolved now, as mentioned here https://github.com/geonetwork/core-geonetwork/pull/8654