While you freestyle, get the other MCs to try to distract you and try to break your flow. They can make funny faces, show you surprising or shocking things, get up in your face, or even physically distract you. How long can you keep in the flow?
If you usually practice in a studio or bedroom or even in a cypher with your friends, you’re probably in a dedicated freestyling environment. The focus is on the freestyle. There’s a lot of freestyle circumstances where that’s not the case: on a street corner, at an underground party, on a stage. In these places anything can happen. People might not respect what you are doing, they don’t care, they want to mess with you or heckle you, or they are doing something that can pull your focus. If you practice for distraction, you’ll soon be able to flow through anything, and even incorporate it into your freestyle.