As said, this only works if your templates no longer include the <f:attribute name="primefaces.THEME" ... attribute. If this attribute is found this has higher prio than the app config.
This works this way, because if you change the theme to something else than freya and in the same application also the protal is deployed, this change would also reflect the portal. And this can break many things, as the portal is designed for the freya theme and not for something else.
If you want to change theme for your dialogs, just remove the f:attribute from your templates then you can change the theme for all dialogs via the app config.
Or what is your usecase / requirement that you want to change theme for each user?
If it is only that you want always light or always dark theme, you can also just use the hardcoded values in the template instead of the dynamic one from the ivyFreyaTheme bean.