The diaphragms in the stock vacuum petcock don't hold up well with the ethanol in the E10 fuel. The diaphragms get holes in them, the the fuel flows through the vacuum tube and into the intake port...then is flows into the crankcase and/or air box.
You can get an expensive "OEM" stock replacement or a rebuild kit and go through this again at a later date - or you can install a Yamaha Raptor petcock that is manually operated...and very reliable. The part number from Yamaha is 5LP-24500-01-00, and it you buy it online be sure you see the part number, the white box, and the words Yamaha. There are a lot of Chinese copies that use the words "Raptor petcock" that are not well made....you should expect to pay about $30 for it.
If you look at this eBay link you will see the real ones for $26.99 with the white box that are real Yamaha parts...and the $7.99 Chinese copies.
https://www.ebay.com/sch/i.html?_from=R40&_trksid=p2380057.m570.l1313.TR1.TRC...