Even if all forms are correct, I prefer the uppercase.
Due Recht is mostly used as a noun.
Mit deiner Handlung bist du im Recht.
Literally means, that your behavior fits to the law. Law is an object and therefore written uppercase in habit.
But there are also usages of Recht in which it is not used as a subject or object and lowercase is more adequate.
„Was hältst du von Pizza heute Abend?“
„Ja, das ist mir recht“
Person2 agrees to Person1s suggestion. recht is an adjective here which represent the state of Person2s opinion to the suggestion.
If you don’t know if to write something upper- or lowercase, always question if the word is a subject/object. If that, it’s always written uppercase.
But pay attention, we got a saying here in Germany:
Die wichtigste Regel der deutschen Sprache ist die, dass es immer Ausnahmen gibt.
(The most basic rule in German is, that there are always exceptions.)