PS4 - disc and digital copy of the same game
Solution 1:
I have had this happen multiple times, especially with free PS+ games. I've always had to uninstall the disc version then download the digital version. You can back up your saved games if you're concerned about losing them, but they should be fine.
The disc version probably doesn't install literally everything since it can read some content from the disc, so it makes sense that you'd need to install a new version to play it without the disc.
Solution 2:
If you buy a digital version of a game you already had on disc, it removes the requirement that you have the disc in the system to play. You would now own the digital version of the full game plus whatever bonus content came with the digital purchase.