Denis Shapovalov was left scratching his head after a bad decision set the scene for a shock exit in the French Open second round.