Both are still valid. There is no specific guidance on the docs.asp.net github project. Although there is this discussion on docs.asp.net issues.
That links through to a comment from one the product team which says:
“Since ViewData (Dictionary) look-ups far out-perform ViewBag
(dynamic) invocations, the last is probably the best choice.”
So I’d say it purely a style choice based upon the fact that ViewData performs better.