The issue occurred because we updated the theme value after setting the root (not before), which caused the root to be initialized with the old theme value.