The "rear parking sensor blocked" would seem to be something that comes up more when you have trailer connected or something immediately behind the bumper sensors (like my receiver hitch with crossbar for the rocktamer mudflaps). Should have nothing to do with tailgate as the sensors are in the bumper; not the tailgate.
Besides the "tailgate ajar", the other message I get is that 'Backup brake assist' is unavailable and to see owner's manual.
As for your question of
"Is it possible to undo the harnesses and put in plugs while the tailgate is attached and then lower tailgate and remove? Maybe that clears the issue…?"
The sensors are active so it doesn't matter in what order you remove the harness, plug what back in and then undo, as far as the "tailgate ajar" message. I rolled my tailgate on a dolly under the truck and plugged everything back in and it all worked (after I physically flipped the two tailgate latches closed on the tailgate itself, of course, because that is what the tailgate ajar sensors detect. As soon as I released those latches or unplugged the tailgate, back to the "tailgate ajar" message). I suspect that would be the same for your "rear sensors blocked". The sensors really should be unaffected by tailgate being removed as those are in the bumper. They should be unaffected by tailgate position, camera being removed, etc. but with how intertwined all these sensors and cables are, never say never. I don't think a layer of dust would effect the backup sensors, but a layer of mud might.