Allow me to cut right to the chase: the guy with a white beard on Endor in Return of the Jedi is NOT Captain Rex. Period.
Honestly, I am not sure what else to say about this topic because, on the one hand, it is dumb, while on the other hand, it is dumb. Yeah, you heard me, it is dumb. I tend not to be this blunt when it comes to debates within the Star Wars fandom but on this topic, I have decided that blunt honesty is for the best.
Okay, let me give you some context just to make sure you and I are on the same page. A long time ago, after Captain Rex was re-introduced in Season 2 of Star Wars Rebels, some fans began to speculate that Rex was one of the strike team commandos in Return of the Jedi. The reason why people thought this? Because this older version of the clone captain had a white beard and, oh my gosh, so did one of the Rebel commandos!
A white beard, that was it, that was the connection. Clearly this superficial similarity must mean that the commando and Captain Rex were one-and-the-same! Except, another pretty obvious and glaring problem was hiding in plain sight with this “fan”-tastic theory. Nik Sant, the commando in question, was portrayed in Return of the Jedi by L. Burner who is white. Captain Rex is a clone trooper and his likeness as a clone is based Jango Fett who was portrayed in Attack of the Clones by Temuera Morrison, and he is not white, he is Māori.
Nik Sant, white guy. Captain Rex, not white guy.

Photo Credit: Star Wars Episode II: Attack of the Clones
Pretty easy and simple to figure out that they are not the same person. Except, for some reason, this “debate” about whether Captain Rex is in Return of the Jedi just loves to pop-up periodically with people teasing the idea that maybe, juuuuuust maybe, it actually is Captain Rex. But it isn’t because, again, Nik Sant is white, and Captain Rex is not white.
“But Imperial Talker, sir, you have to admit it is pretty wild that Nik Sant is an old guy with a white beard AND Captain Rex is also, around that same point in the Star Wars timeline, an old guy with a white beard.”
Yes, how incredible wild! It is as if more than one character in Star Wars can be a guy with a white beard, and not just any white beard, but an immaculately groomed beard.
Here, how about we compromise: rather than continuing to speculate (as this recent Screen Rant article does) about whether Captain Rex is or is not the guy with a white beard on Endor (he isn’t), we instead make it a canonical fact that both Rex and Nik Sant were best beard buddies. Hell, let’s imagine that Nik Sant, having met Captain Rex one day roaming the corridors of Home One, was convinced by his new clone friend to grow and groom his facial hair just like Rex. Thus, their beards can be canonically linked whilst ensuring that Nik Sant and Captain Rex are not only maintained as individual characters but, perhaps most importantly, two silver foxes kicking the shit out of the Empire.