Maybe but this would be where refs call fouls (just like in basketball).As with corners it just resulted in shoving near the goal which is interesting for a corner but not if it’s going on all game (you’ve also just added a second ref necessary to police it). Iirc isn’t that also the origin of the line of scrimmage in football?
Once a foul is called the play is dead and the other team gets to start working the ball up the field.
Keep in mind that both teams can park a forward if there was no offsides. But if you do this you're playing man down until the ball is in the other teams side. At the highest levels could you allow this? I dont know.