I found out that the defensive line is not just about defense it determines how much the team is strechded along the pitch.
I tried to play with Defensive line with 1 notch and then with 2 notches and it made a big defference in the team's play the players were closer to each other with no gaps a more smooth play.
I'm expermenting at the moment, but it seems that mentallity is not the reason why you have gaps it's the defensive line.
the higher the defensive line is set the higher the players will be up the pitch and more streched thus leaving gaps between them.
if you set the mentallity for defenders too defensive and for forwards too high it doesn't affect creating gaps as some suggested before.
I'll keep expermenting and report back.