In version 1.15.2 I could place a door, open it, then use two setblock commands (/setblock ~ ~ ~ oak_door[open=flase] replace); one for the top half and one for the lower half and it would closed said door. This no longer works in 1.16.1. It's just destroys the door entirely. This is a similar issue that happens with chests, where you have to use another command to set the block to air first then set another door/chest, which is both tedious and causes you to add extra command blocks.
Linked issues
Comments 5
MC-190050 was resolved as Won't Fix
@MishMoshKeel21 This issue has nothing to do with MC-172592 as this isn't an illegal position, it's a block state what we are trying to change, the door going from closed to open by just changing the way the /setblock command is executed; the bug is refering to the error message "Could not set the block.", which often happens when the user tries to place the same block already in that coordinate, previously the game would interpret it as clearly not being the same block and allow us to change the door's state to open, just like you would with (/setblock ~ ~ ~ blast_furnace[lit=true]) and then set (/...[lit=false]), in game that still works, some block states can be change but doors are having this issue; my guess is that the game isn't recognizing the change in block state so we get the error.
Duplicate of MC-192791
1.16 removed the ability to setblock blocks into illegal positions, to fix MC-172592.