Unless your plumbing code is unusual, you have to use 45's until you are
6" above the flood rim of the highest fixture on the floor served by
the vent
(From memory quote of IPC 2018 language)
Vents must be "vertical" below that point but "vertical" for vents allows up to 45 degrees off vertical.
So you could move the upper 90's up a bit and pass, while the lower deviation would have to be 45's to pass. Presumably the dry vent serves only the floor below, and that could be 90's on this floor, as it would meet the language of the code (that's why floor served is in there.)
I suspect it might be possible to meet code and use smaller pipes for the deviation - you'd have to calculate the required vent load, but you could perhaps go to a 2" dry vent and a 2" drain for the deviation, rather than maintaining 3" all the way, then rejoin the 3" pipe above (with the new dry vent, the lower floor dry vent, and the extension of the 2" drain (which is also a dry vent at that point.)
The capacity of a pipe serving as a dry vent is considerably greater than the same size pipe serving as a wet vent, per the vent rules/tables. So that's why a dry vent might let you shrink acceptably here. That also lets you make a 90 on the drain part, as it's not a vent if the dry vent is big enough to handle the vent loading.
Starting from your revised picture: Green as drain, your black (45& vertical) as dry vent, you move the drain cross over to the drain, you offset the 2" dry vent and presumed 1.25-1.5" lavatory drain going to the drain cross so both fit in the wall without connecting there.
As commented, depending on the total vent loading, your revised drawing might work as is.
