Do you happen to know what caused improvisation to disappear completely from the world of classical music, despite arrangements (Horowitz on Liszt's HR No. 2, for instance)?
I've got a better answer: It hasn't. It's only stopped if you think of "classical" music as being stuff that was written long ago that needs to be regurgitated verbatim. Yuck. Hamelin is a great example of a classical pianist/composer who often does his own cadenzas. Or consider some of the crazy creative work Hilary Hahn is doing. There are also great examples on other instruments, of course.
Where improvisation has really disappeared is at the local level. There is little real classical improvisation for the same reason high schoolers are taught never to start a sentence with a conjunction or never to use "ain't". Because those are the rules? Why? Shut up and play the notes.
The ugly fact is that there are very few extraordinary piano teachers, just as there are very few extraordinary science teachers or English teachers. Present company excepted, hopefully. I am so profoundly grateful for my wonderful first teacher who got me off to a great start--by rigorously sticking to the sheet. By teaching me that it wasn't good enough for my hands to know my music--I had to truly memorize it to the extent that I could sit down and transcribe it away from a piano. Yes, I appear to be contradicting myself. But I'm not. Here's what I mean:
You have to walk before you can run. Classical improv--like jazz--doesn't come from nowhere.
I've been amazed, frankly, to see all the debate here and elsewhere about how metronomes or scales are evil.

Or how Czerny is a relic. These things aren't evil. They're necessary to learn. One might not need exercises later, but anything--anything--that helps you identify weaknesses in your skills and understanding and forces you to address it is necessary. Maybe it's not Czerny and scales, but it needs to be something systematic and challenging.
Improv isn't a feeling. It's something that extraordinary musicians can do consistently if they're well taught and disciplined in skill and theory. (Of course it doesn't hurt if they're supported by listeners who have a clue what's going on.) The giants of the past--those known for improvisation and for taking off from "the sheet"--were also the exact same pianists known for the very things that I've seen disputed or regarded as optional on this forum.
Competitions and auditions are
precisely the places where improvisation should be
most welcome as a measure of someone who's mastered discipline and the basics. But that would require the judges to be musicians (and for competitions to be about music). Competitions are to music what standardized testing is to real learning. (FWIW, my first two teachers never even mentioned that there was such a thing as "levels". I only discovered them to my dismay when I had to find a different teacher later in life.) Levels are useful, I suppose, to motivate the unwilling (or to convince unmusical parents that their $$ is well spent), if you see music as having anything to do with a certificate on the wall, or if you have to quantify being a pianist as if it were like being an athlete. ("I hear Goode is currently pegged at #7 in the male individual rankings. Let's review his stats...hmm, it looks like his next big
game competition might lower his ranking if he doesn't score well.") What complete rubbish.
Where did THAT come from!

... I guess this touched a nerve. I'm sorry if I offended, I'm not thinking of anyone on this forum. You're all wonderful human beings and the most musical and good-looking people in the world.

Screed over.
To answer the original topic question: IMHO it's okay not to follow the sheet--it can even be a
wonderful thing. But try, please, try to
understand the sheet and have as your goal only to stray from whatever arrangement you're playing after you've mastered it. Master it--then go nuts. It gets easier. The more time you spend thoroughly learning pieces the easier it gets to learn them.
(Unless, of course, you're just fooling around at home and this isn't about performance.)