The good news is, Yes! But there's a small catch... you have to start riding in the scheduled event first, and continue riding afterwards, to have those miles included in that second activity.
Adding Miles Before the Event
However, if you start riding on the course, any segment, adding up miles prior to your subscribed ride event, your pre-event miles will be considered one activity, and the scheduled ride itself will be considered another, separate activity.
In other words, if you log into Zwift 30 minutes early and ride 10 miles as a warm-up, and then your event starts and you ride an additional 35 miles, you will not have an activity that includes 45 miles. You will have 2 separate activities; one with 10 miles and another with 35 miles.
Adding Miles After the Event
If you begin queued up in the pen with 0 miles, and you ride those 35 miles within the scheduled event, and then keep riding for an additional 10 miles, your activity as uploaded to Zwift/Strava/etc. will reflect 45 miles. That's probably what you want.
Combining Your .fit Files into a Single Activity
There's another option, if you want to do your pre-event ride miles, and have them included. You can use the tools at "FitFileTools" to stitch the two .fit files together into a single .fit file using their "File Combiner" applet, and upload that manually to Strava.
"Banditing" the Event
The last option is to not actually register with the event "officially", but monitor the start time closely, and position yourself near the starting pen. When the riders fire off, just hook on (this is called "banditing", aka riding in a registered event without actually registering), ride the same race route, miles, effort... and then add your miles onto the end, or onto the beginning of that event.
Those miles will be included, because they're all within a single activity, and since you didn't register for the event you bandited, Zwift won't truncate your activity into two separate files.
Hopefully that gives you a few ideas you can use to keep your intended mileage within the same activity so you can sync or upload that to other services for integration.