Hard to tell, especially because you don't mention the make, model, displacement or year of bike, but it looks like a rubber one-way valve from the power-valve breather. Normally they don't give a problem unless the gearbox is overfilled, the crankseal shot, or a gasket leak has occurred.
If I am right (and not sure I am from hazy picture) I'd clean up the engine, clean out remaining oil in the power-valve breather box, check or change the gearbox oil and leak test the crankcase to see if there are seal or gasket leaks. Leak testing is blocking the intake and exhaust and applying 7psi on the engine internals, looking for it to hold without leaking.
The is the closest pict I could find like what you are showing us, 2014 KX85: