I bought the MVP digital edition from the Playstation Store through my PS5. With my playstation account, I've already downloaded the PS5 edition to my PS5 and the PS4 edition to my PS4 (download started March 7 but can't be played until the 15th I believe). My son plays the PS5 more than I do and my PS4 is located in our home office for me to play if we're both wanting to play at the same time or if the kids are watching TV in the family room where we keep the PS5.
I've done this with multiple games. I have NHL on both devices and WWE2k24 on both devices. Admittedly, I don't think we've tried playing on both devices at the same time. My son, my daughter, and I all have different playstation accounts. If my son accidentally tries to play on my account on the PS5 at the same time I'm playing on the PS4, it'll kick me out as the same PS account can't be used on two devices at the same time. But as long as you have different accounts, you should be fine (and all the accounts loaded on any given PS5 or PS4 can play any of the of the games downloaded to the gaming system....so when I download MLB The Show using my PS Account, he could play it while logged in to his account). I'd assume since the PS5 game and PS4 game are completely different downloads, both can be played at the same time (by different accounts)
Where are you buying it that a digital code would be involved? Wouldn't it be easier to just buy it through the PS Store on the Playstation? I'd assume even if you get a code from a store like Target or Gamestop or something, once you enter the code on the Playstation, you'll be given access in your library to download both the PS5 version and the PS4 version and you'll just have to log in to both gaming systems and download the appropriate game from your library of games.