When using the /fill command to place walls, the topmost changing layer doesn't properly place; the block will not exist until a block update happens near it, but still prevents other blocks from being placed in that location.
Repeating the command makes further layers of invisible, non-solid wall blocks at the next level down from the first layer, and so on until all wall blocks in the affected area are invisible/non-solid. Also, it seems to treat the visible walls as a separate block, as the visible walls are replaced by a command to place them, but the invisible ones are marked as not needing to be replaced.
Resolving as duplicate of MC-127116, the issue is that the default state has all connections (including "up") set to false; blocks filled next to each other update the approopriate connection state only; and since the top wall gets no update from above, it stays with all connections set to false.