I’d be a bit hesitant because a lumber rack isn’t designed for those types of loads but I suppose it depends on how sturdy it is and the specific design. Definitely don’t put any load out above the cab as that’s not supported and lumber wouldn’t put much weight out there at all.
The RTT is probably also a fair bit heavier with two or more people up there and you would be shifting your weight around in ways that lumber wouldn’t. While you’re driving the tent would act as more of a sail than the lumber would.
Also those rails on the side of the lumber rack in your pic aren’t meant to take any load at all. They’re just there to corral the lumber.