Possibly one of "spray", "fizz", "surge", "foam", depending on how large/strong the flow of liquid, along with a preposition like "out", "from", or "over", depending on how you describe the movement of the liquid.
Why does a shaken soda fizz more than an unshaken one?
Does Tapping a Soda Can Prevent it from Foaming Over? when the shaken can is opened, there will be a surge of cola and foam out of the opening.
"Explode" is also used:
After shaking a soda bottle/can, what makes the soda explode out when you open it?
ell.stackexchange.com/users/42184/Andrew
I suggest the word spew which is defined by Lexico as spew VERB 1 Expel large quantities of (something) rapidly and forcibly.
buses were spewing out black clouds of exhaust Edit: as commented, a better dictionary reference is the next item in the same definition.
1.1 Be poured or forced out in large quantities.
great screeds of paper spewed out of the computer
Your sentence could be The drink spewed out [of the can] after he shook the diet coke can and opened it.
ell.stackexchange.com/users/56820/Weather Vane
Another possibility is erupt : From Merriam-Webster : 1a (1) : to burst from limits or restraint (2) of a tooth : to emerge through the gum b : to force out or release suddenly and often violently something (such as lava or steam) that is pent up c : to become active or violent especially suddenly : break forth war could erupt at any moment the audience erupted in applause 2 : to break out with or as if with a skin eruption erupt is most often used to describe volcanic eruptions, which I think is fitting because the sudden release of built-up pressure within a soda can is analogous to the sudden release of pressure during a volcanic eruption
ell.stackexchange.com/users/474/mowwwalker
I prefer the term burst.
The drink burst out of the can after he shook the diet coke can and opened it.
Burst - Merriam-Webster : to break open, apart, or into pieces usually from impact or from pressure from within
ell.stackexchange.com/users/94603/Voldune
I believe the correct word is gush or gush out def: to flow or send out quickly and in large amounts: Oil gushed (out) from the hole in the tanker.
Blood was gushing from his nose.
Her arm gushed blood where the knife had gone in.
ell.stackexchange.com/users/98410/Benoît Carlier
To me, the most natural way to say this would be
The drink spurted out of the can.
A close second would be
The drink sprayed from the can.
However, The drink exploded from the can would also be perfectly fine – and would in fact be the best choice if he shook the can really hard
and you want to emphasize that the drink came out very quickly and forcefully.
These aren't phrasal verbs, of course – but then, neither is "explode out of."
ell.stackexchange.com/users/95506/Nanigashi
What's the phrasal verb for carbonated drinks exploding out of the can after being shaken? "Exploded out" doesn't sound right, because it doesn't sound idiomatic. I also checked pop off, but it seems to be used for physical non-liquid things like the cork of a champagne bottle.  For example:   The drink ____ out of the can after he shook the diet coke can and opened it.
Phrasal verb for carbonated drinks exploding out of the can after being shaken?
ell.stackexchange.com
<phrase-request><idiomatic-language>
ell.stackexchange.com/questions/218210
ell.stackexchange.com/users/93377/blackbird
Possibly one of "spray", "fizz", "surge", "foam", depending on how large/strong the flow of liquid, along with a preposition like "out", "from", or "over", depending on how you describe the movement of the liquid.   I believe the correct word is  gush  or  gush out  def: to flow or send out quickly and in large amounts:  Oil gushed (out) from the hole in the tanker. The drink spurted out of the can.    The possibilities are as follows: "spray", "surge", "foam", "sprayed from", "spewed out", "burst", "gush out" or "spurted out". 
The possibilities are as follows: "spray", "surge", "foam", "sprayed from", "spewed out", "burst", "gush out" or "spurted out". 