There was a demo for a horror game called P.T. on PS4 made by Kojima. It got cancelled and the demo was eventually delisted from libraries preventing players from re-downloading it. The only way to play it is if you already downloaded it prior to delisting and never uninstall it. For a short while there was a way to download it via a web link, but Sony eventually shut that down.
It did disappear from your library, it just wasn't auto-uninstalled from your system. But you can never ever download/install it again. That's why systems that have it installed already go for so much money on eBay.
You are technically correct but I did write "if you buy a single player game digitally..."
Nobody bought P.T.
The Scott Pilgrim game was delisted on the Ps3 when the license expired, and I can still download and play it today. Being delisted just means new customers can't buy it.
There's no way Sony's terms of service allow developers to pull games from the library after purchase, that would be a remarkable business failure on their part given how much leverage they have in negotiating the TOS with developers.