With shadowing, I find the most important thing is to avoid boredom. Boredom causes you to be less attentive in both listening and speaking. I like shadowing while walking, because it removes a lot of other distractions, but I haven't been able to do that recently because of a recent knee injury and the absolutely awful summer heat here. But when I have done it in the past, I made playlists that have short tracks for shadowing mixed with tracks for just listening or music (I have done this also for playlists for when I drive). I also avoid repeating the same thing over and over during a shadowing session. Just drilling the same thing into the ground is the fast track to tedium for me, and doesn't really help with forming long-term memories, so I just don't. Long-term memories are better formed by encountering the material regularly over longer intervals of time. So I prefer to just shadow a group of sentences once a day, but doing that 2-4 times a week. The key is follow-through and actually remembering to do that.
One "hack" of sorts that I've used for many years now is using the audio files from 50languages.com
for shadowing. In most cases I can just add those files to a shadowing playlist without editing them (you can also download them with just the target language too for deeper immersion). Most of the courses there have two different speakers saying the TL phrase, usually one male and one female. So what I like to do is listen to the first speaker, repeat the phrase myself during the pause, and then say the phrase along with the second speaker. Some of the courses--like the Japanese and Swedish courses, if i recall correctly--only have one speaker, so in the past when using those courses I would just repeat afterwards. Another issue is sometimes the second speaker has much different accent, like with the Russian course that I'm currently using for this purpose, but I just go with it. This is about repeated exposure over time for forming long-term memories as well as muscle memory for speaking. Perfection isn't the goal.