OnSong transposes from one key to another by comparing between then original key and the target key and then modulating the chords of those keys appropriately. This handles things like enharmonic preferences and accidentals. This means that the first issue you may encounter are instances of where OnSong doesn't really know the key the song is written in. So to perform a transposition, OnSong needs to guess or determine the key. By default, OnSong will use the root of the first chord of the song as the key. Obviously this isn't the most accurate method to use, but being that no method can be 100% accurate, it's the easiest one for most users to understand and for us to explain.
Let's take a complex song like "Just The Two of Us" by Bill Withers. This is not your average song and trying to intellectually determine the key of the song will cause even the most seasoned musicians to break out the music theory books. Guitar Music Theory has a lovely commentary on the song.
In general what this all means is that the song is technically in the key of Fm, but it starts on a C major. This sort of makes no sense since the key of F minor contains an Eb, until you consider the melodic minor, which raises the 7th of the key up one half step, giving us the E major note. The 7th is just jazz on top of that. The B major then works along with many of the other chords in the song. Let's take a moment to appreciate this chord progression. It truly is a work of art.
Moving on, the issue is that we need to have the proper key for OnSong to handle the transposition properly. In your Song Editor, you could write the key in manually if you knew it. But if not, tap on the "information" icon to open the Metadata Editor Menu. Next, you can tap on the Key option where it says None to Choose Key.
Here you're given a list of keys we can choose from. However in this case, we just don't know so we can tap on the Detect button in the upper right corner. This will process each chord in the song and count the number of sharps and flats used by all the chords in the song. This process should handle and weight the accidental usage as well and come up with the proper key, at least according to some basic music theory rules.
Once done, tap back and close the Metadata Editor Menu. Your song should then be updated with "Key: Fm" displayed in the metadata section of the song. Now when you use the piano icon to open the Rewrite Into Key Menu to rewrite the song into another key, or use the Style Preferences Chords Tab, it should behave properly.