A large inline filter can cause problems, and create a low spot in the fuel line that interrupts flow.
The hose from the petcock to the carb isn't long enough for anything except a small mower-style filter.
There is a filter designed to go in the carb inlet, and it should be adequate to catch anything that is heading for the carbs. This section may help -
https://faq.ninja250.org/wiki/How_do...fuel_filter%3F
Check that your tank is clean and rust free also.
Make sure the air filter is in good condition, not over-oiled, and the snorkel under the seat is clear.