Notice in that passage (James 2:8-12) that the royal law does not replace the law from where it came from. It fulfills them. IOW, if your keeping of the law, 'love your neighbor as yourself' is not keeping the other laws, then you're not loving your neighbor as yourself. Paul says the same thing....
Romans 13:9
9The commandments, “You shall not commit adultery,” “You shall not murder,” “You shall not steal,” “You shall not covet,” a and whatever other command there may be, are summed up in this one command: “Love your neighbor as yourself.”
When you do not commit adultery, or do not murder, or do not steal, that is simply command keeping. It is when you are 'loving your neighbor as yourself'. The command 'love your neighbour as yourself' is not your release from keeping the other commandments of God. Keeping the other commandments is
how you love your neighbour as yourself.