I found a crazy bug in scrap brain act 3.
The tunnel was in the way of dead Sonic falling and when he touched it, it caused him to float to the top and when he was outside the room the results screen appeared and then Sonic (with his level cleared animation) came falling downward. After this happens the level completes as if you completed it normally. So basically the tunnel is the cause of the bug.
Hope this helps.