I have done things similar to this in races before. Obviously do not do this if you want to run your best time. It will not "work" if you want to do as well as you can.
I did these while officially entered in the events. I would never consider doing this while paying to enter current races with high entry fees.
In a modified form, did this in a road marathon. Paced a friend through 20 miles (he finished ~14th) and then I left him and ran hard to the end. Caught and passed everyone but the eventual winner, who only finished 7 seconds ahead of me. I needed another 200 meters...
In a 10k, ran the first mile hard to lead the race, then dropped back to run with a friend, then ran the last mile hard.
In a 25 runner low key hilly trail marathon run, I ran hard out front till I came to an unmarked intersection. There were course instructions but someone running the thing was marking the turns during the race, When I got to an unmarked intersection, I turned around and ran back until I met the last runner, then turned and run hard till I passed everyone and came to another unmarked intersection. Then turned to do it again and again and again... This was harder to do as the race progressed.
I totally bonked after about the 20 mile mark, having already run about 26 miles. As I faded badly, people started to pass me.
Fortunately I knew just about everyone, and they all took pity on me. They encouraged me and gave me gels and stuff till I finished my 32 miles or so mid pack.
In a big city 10k, cruised the first mile, then ran hard until 20 people were passed. Then cruised to the next mile mark, and ran hard until 20 more people were passed. Repeat. You need to run the first mile slow enough so you work your way up through the field and have people to pass.
In a track mile, the goal was to run each lap faster to finish in 4:20. Ran 68, 66, 64 but could only manage 63 on the last lap. Was a far back last after the first lap and 2nd at the end.