Einstein finalized his theory of relativity in 1916 and it was widely accepted in the physics community by the 20s. Additionally, Einstein was primarily a theorist (vs an empiricist) so while there was room for initial disagreement, the solar eclipse in 1919 offered evidence and majority opinion accepted the theory.
Climate change has both consensus and evidence. It seems irresponsible to keep spreading doubt in the face of both.
He published his first important papers in 1905 and received the Nobel in 1921. His work was controversial for decades, but I would argue that there was no consensus in physics at that time.
How many were against Einstein for decades? Appeal to consensus among experts is still a fallacy.