Man, some of these comments are baffling. Stop playing because the drummer is playing interesting stuff? Seriously?! Yeah, I'm sure Dennis Chambers would love it if the band just quit the gig in the middle of his solo.
Your job is to hold it together no matter where he goes. He's counting on you to be the groove Sherpa and lead everyone through the form, time, and rhythm while he goes off the beaten path. Just like he does for your solos, even if you play silly stuff and rely on him to keep time while you meander through your own rhythmic ideas.
If you can't hold it together then you have identified something you need to work on, and that's a good thing! Start with serious metronome practice. Play your scales, exercises, and grooves along to the click. If you have trouble keeping it steady then record yourself so you can listen back and identify where you are getting lost. Normally, a drum machine or loop is a good practice tool, but in this case you need to establish your own sense of time without the drummer holding your hand.
You can work on your sixteenth note subdivisions in the same way. Set the metronome slow and play the 1, then whatever accent you are trying to lock in your brain. I'd cycle playing 1 and the "a" of 1, then 1 and the "a" of 2, and so on, cycling through them one at a time to really get familiar with how each note placement feels in relation to the 1. Each one has a unique flavor, once you get that in your head it's a lot easier to identify because you can feel it rather than having to count it.
Lastly, if you have a good report with the drummer you can always talk things through. Ask for a hit or accent on the downbeat when things get gnarly, or see if you can adjust your part to stabs that other band members can join you on, so you have some backup and a visual cue from them. When I'd play with drummers who could take "out" solos I'd often stand close to the guitarist and we'd tap our feet and watch each other to ground one another as the drummer got further away from the pulse.
Your job is to hold it together no matter where he goes. He's counting on you to be the groove Sherpa and lead everyone through the form, time, and rhythm while he goes off the beaten path. Just like he does for your solos, even if you play silly stuff and rely on him to keep time while you meander through your own rhythmic ideas.
If you can't hold it together then you have identified something you need to work on, and that's a good thing! Start with serious metronome practice. Play your scales, exercises, and grooves along to the click. If you have trouble keeping it steady then record yourself so you can listen back and identify where you are getting lost. Normally, a drum machine or loop is a good practice tool, but in this case you need to establish your own sense of time without the drummer holding your hand.
You can work on your sixteenth note subdivisions in the same way. Set the metronome slow and play the 1, then whatever accent you are trying to lock in your brain. I'd cycle playing 1 and the "a" of 1, then 1 and the "a" of 2, and so on, cycling through them one at a time to really get familiar with how each note placement feels in relation to the 1. Each one has a unique flavor, once you get that in your head it's a lot easier to identify because you can feel it rather than having to count it.
Lastly, if you have a good report with the drummer you can always talk things through. Ask for a hit or accent on the downbeat when things get gnarly, or see if you can adjust your part to stabs that other band members can join you on, so you have some backup and a visual cue from them. When I'd play with drummers who could take "out" solos I'd often stand close to the guitarist and we'd tap our feet and watch each other to ground one another as the drummer got further away from the pulse.