Facing issue of security.backend.enforceReferrer

We have set up TYPO3 version 12.4.13 on a Windows server. Everything works fine using localhost, but when we use an IP address or domain, it does not redirect to the dashboard and gets stuck at the main URL. However, when we set security.backend.enforceReferrer to false ([SYS][features][security.backend.enforceReferrer] = false), it works, but the settings and maintenance page become restricted. We have tried many things to fix this issue but have not been able to set up TYPO3 properly due to this problem. Could you please suggest how we can set up TYPO3 correctly on our Windows server?