Considering that Boseman knew he had the cancer while they were filming previous movies... I wouldn't be surprised if they didn't film some scenes ahea of time just in case. Not enough for a whole movie but enough to explain what happened to T'Challa if they had to write him out and why there's a new Black Panther.

Edit: @Above, if that's true it's a recent thing: when robin Williams died he was able to get an injunction stopping the use of his physical or vocal likeness including unreleased recordings and imitations of himself for IIRC 15 years after his death.