When I saw this play live, I thought it was very close to DPI. Yes, both players have a right to the ball but neither play can go through the other to get it. The was a lot of contact on this play and some of it beyond 5 yards. It was a close call.
But sometimes you just have to credit the defender with making a good play on the receiver. Maybe Gallup could have flattened his route a touch more to prevent the defender from cutting him off but his route wasn't that bad. Just a good play by the defender.
I would note that SF plays very solid inside 10 yards. They way to attack them is down the field. Maybe if Gallup faked the fade and turned upfield at full speed Dak could have thrown the fade but those 5 yard passes did not do the Cowboys much good all night.
And again, the OL, the starting 5, collapsed on Dak forcing the throw.
I watched SF against the Giants and Rams and I have to be honest, the did not play as well against those teams as they did against Dallas. It would not shock me if the Eagles take the 49ers down because they will run up the middle and take deep shots.