When using foot pedals, OnSong automatically advances to the next song in the song viewer when you press the scroll down pedal after reaching the end of the song. You can turn off this feature by going into the Foot Pedal Setup screen by tapping on the foot pedal icon in the menubar. Next, tap the Pedals tab in the bottom left of this menu, and tap on the wrench icon in the lower-left corner to open the Foot Pedal Settings Menu. Finally, scroll to the bottom of the menu to the Options section and tap on the Set Navigation option to disable. Disabling this feature will prevent a foot pedal press from navigating you to the next song in the song viewer. You will need to manually swipe to go to the next song.
Another way to avoid navigating your set unexpectedly is with bumpers. Bumpers display notifications when you reach the top or bottom of the song that shows you what the next pedal press will do. You can learn more about this in the Bumpers Video Tutorial.