Indoor training is all about efficiency, and watts lost to suspension bob means you’ll have to push harder to hit your targets, but there are two schools of thought as to whether or not you should lock out your suspension.
If we are talking about just nailing your intervals, locking out your suspension or firming up the compression will make sure that your bike isn’t wallowing up and down while you suffer through sprint intervals.
Having said that, while you’re out on the trail, your suspension will be active, and one could argue leaving it unlocked on the trainer will provide a more realistic riding and training experience.