Welcome to the site
It most likely is that you are using a O'Ring chain with a non offset front sprocket , the O'Ring chains are wider and will sometimes hit the chain if the slack is too loose , or if a standard sprocket is used
So first things first
Check that the Axle is adjusted squarely/evenly so as not to make the chain side be shorter than the brake side, this will ensure that the wheel itself is straight
Make sure the chain is not too loose , as this will allow side to side slop (but do not make it too tight)
Make sure that if the front sprocket has a offset , to make sure its sticking out not in
If all is correct and it still hits , then just trim the side of the mud flap so it clears the chain (trim it to or just past the wear/cut marks) , it won't hurt anything and a lot of do it