The requirejs-config.js file sets the value of window.LOCALE using the mage/cookies module, which retrieves the user's preferred language from a cookie named mage-translation-storage. This cookie is set when the user selects a language from the language switcher in the storefront or the backend of the site.
So in your case, since the window.LOCALE value is undefined, it may be that the mage-translation-storage cookie is not being set correctly. You can try clearing your browser cookies and refreshing the page to see if the issue resolves. Alternatively, you can check if the mage-translation-storage cookie is being set and if its value matches your desired locale.