@Herasux
I'm convinced that Drake intends to get his hands on something specific in Wano than just hightailing out of there, now that his role as a spy is out in the open.
I think he would have only prioritized on escaping the situation and going back to the marines if his role as infiltrator was limited to
reconnaissance. But he makes it clear in the above panel and afterwards that his goals align with that of the alliance's for now i.e Kaido's defeat, which potentially would make it easier for him to do his own thing inside mainland Wano.
It's anyone's guess what he could be seeking here, but one thing's certain that odds off getting what he wanted was improbable with the beast pirates' presence.
Again, if his role was restricted to reconnaissance, he would have blatantly refused Apoo's proposal. Now, he is seemingly contemplating a temporary alliance with him since he knows this could as a great deterrent for any residual forces trying to interfere with his goals after all's said and done.
What's even more interesting is that I don't see his role being over here without facing off against the CP0/WG at least once. For all we know, WG's decision on imposing forceful jurisdiction of Wano could also involve getting a hold on the poneglyphs AND what Drake seeks here.
With the alliance's forces bruised and battered by the end, I wouldn't be surprised by more sword forces coming in to stop the WG in in its tracks. Some really interesting possibilities with Drake going forward despite the disappointment with him as a combatant.