Who shall separate us from the love of Christ? Shall tribulation, or distress, or persecution, or famine, or nakedness, or danger, or sword?
Romans 8:35 ESV

Nothing outside of ourselves can separate us from our love for Christ. (Nor his love for us, for that matter, but vs 28 and 36 indicate that's not the topic here.) If your love for him is true, then you will keep his commandments no matter what the world throws at you.