I'm going to assume you want to do this within Studio One only (as opposed to a pre-DAW software that's proprietary to your interface, such as UA Console).
Very simple! What you want to do is apply the plugin to the pre-channel input section of your track as opposed to the mixer channel like you normally would.
To do this: Open your Mixer window - at the lower left corner, you'll see a small right arrow pointing to a vertical line (among many other icons). Hovering over it should reveal the text "Show Inputs" - clicking this will reveal a new box with all your channel inputs on it. Add your compressor plugin under "Inserts" just like you would on the mixer. Anything placed here will bake into the track like you want. Super useful. I was unable to upload a screenshot, but I hope this helps. Let me know if you have more questions.