You can put a spiderwebshade underneath the hardtop. And then just open up one panel. The spidewebshade will keep the dog contained inside while still allowing ventilation. Also it fits perfectly with the top off or on.
One bonus is that you get a spiderwebshade
which is useful when you're topless in the summer since it provides shade while keeping the open air feel.
or another option would be something like this