but their OTL fate wouldn't have been averted, since Austria would have a very good reason to annex the region, and this time Veneto wouldn't even have been granted what few shreds of autonomy it was allowed to have during Habsburg rule: Lombardy-Venetia wouldn't have become a loose union of two mostly distinct regions, but a centralized polity ruled from Milan.
I think that it wouldn't happen, if anything can be said about Venice is that they're pragmatic as hell. One time that the french start to be defeated and the venetians would just flip sides (they did it in the War of Cambrai when was a full-on coalition on Venice, isn't so hard for them). But one thing that this alliance could be even to the
benefit of Venice, because would force the senate to go through reamarment and with that, go on with the reconstruction of the fleet and army. This could change the balance of power in the mediterranean as well (But i'm sure that the venetians
wouldn't help Napoleon's egyptian adventure).
Actually, if Venice makes the good decisions, the republic can get out from the Napoleonic Wars a lot stronger than before: Renewed fleet, experienced(ish) army, (maybe) new territories from the habsburgs (Trieste and Habsburg Croatia?) and increased prestige.
But also, everything could go wrong and end up like you said as well