he still kept his like for stepping on others shadows for no reason, but somehow came up with a solution to lock her movements despite that. Maybe the demons skill affected more than her shadow being a gate?
Although if I look closely, odds are he isn't stepping on her shadow, as she has a shadow in opposite dir too. So more likely he avoided the gate even if it was sealed, and decided to approach with sun at his back to force her onto his own shadow. So he fixed his habit.