Only mobile QBs have beaten 49ers and here comes the Cowboys’ Dak Prescott

In the San Francisco 49ers’ first regular-season game, a 19-10 loss in Chicago, dual-threat quarterback Justin Fields escaped left to avoid up-the-middle pressure and threw across the field for a game-shifting, 51-yard touchdown pass to all-alone wideout Dante Pettis.

Asked about the breakdown, defensive coordinator DeMeco Ryans cited a lack of discipline in the secondary.

“We can’t have everyone running down to get the quarterback,” Ryans said, “if he’s not past the line of scrimmage.”

In the 49ers’ penultimate regular-season game, a 37-34 overtime win at Las Vegas, QB Jarrett Stidham regularly extended plays by dodging defensive linemen en route to piling up 399 total yards.

Asked about the breakdowns, pass rusher Nick Bosa cited a lack of pass-rush discipline that would have provided inviting openings for a 45-year-old QB.

“The lanes we gave him, anyone could have run through,” Bosa said. “Tom Brady could have run through them.”

The 49ers’ top-ranked defense has been ferocious this season, but not flawless. And the unit’s biggest issue could be exposed when the Cowboys and Dak Prescott, a QB capable of sidestepping the 49ers’ vaunted pass rush, visit Levi’s Stadium on Sunday in a divisional-round playoff game.

The 49ers were 2-4 in the regular season when facing QBs who rushed for at least 250 yards — both wins coming against Seattle and QB Geno Smith. It’s fair to note the last of their losses to Fields, Denver’s Russell Wilson, Atlanta’s Marcus Mariota and Kansas City’s Patrick Mahomes all occurred before the Niners launched their 11-game winning streak.

However, their performance Jan. 1 against Stidham, who was making his first career start, suggested they hadn’t resolved an early-season sore spot. Stidham and Mahomes were the only QBs to throw for three touchdowns against the 49ers this season.

“That Raiders game was probably our worst effort we had against a guy who could move,” Bosa said Wednesday. “We’ve got to be better.”

Prescott didn’t have gaudy rushing numbers this season — 182 yards in 12 games — but he can move. In Dallas’ 31-14 wild-card win over the Buccaneers on Monday, he bolted left to escape pressure and fired an on-the-run, 11-yard TD pass to tight end Dalton Schultz just before reaching the sideline.

It was a part of a performance in which Prescott threw for 305 yards and became one of five players in NFL history with at least four passing touchdowns and at least one rushing score in a playoff game.

“When things do break down, he’s got a knack for how to get out of that pocket and make some off-schedule plays,” 49ers head coach Kyle Shanahan said. “And that’s why he has had such a successful career so far.”

Prescott, 29, a seven-year veteran, hasn’t scrambled as often since suffering a compound ankle fracture in October 2020. He has averaged 11.7 rushing yards a game in the past two seasons after averaging 19 in his first five.

On Monday, however, he scored on a 1-yard bootleg and had 23 yards on five carries before two game-ending kneel-downs.

Jerry Jones, among the NFL’s most talkative and hands-on owners, said this week that Dallas was likely to take more risks with Prescott as a runner in the postseason. He referenced the 49ers’ recent history against mobile QBs.

“I think what you saw there (Monday) we’re going to get to see a lot of when we play San Francisco in terms of him keeping the ball and relying on that triple threat that he can have,” Jones said on 105.3 The Fan in Dallas. “If we could get it, if he’s healthy enough to do it, his being able to instinctively take that ball and run with it is really a dimension that their defense has a difficult time adjusting to.”

To properly adjust Sunday, the 49ers, who have maintained former defensive coordinator Robert Saleh’s all-gas, no-brakes ethos, might have to ease up on the accelerator. That is, their pin-their-ears-back defensive linemen will need to stay in their rush lanes. And their defensive backs, most notably aggressive, play-making safety Talanoa Hufanga, will need to maintain their coverage assignments when Prescott flees the pocket.

“It’s going to be a big (emphasis), for sure,” Bosa said. “He kind of does it anywhere (inside) or outside, each way. He’s a big creator down the field after that. So that will be a big focus this week.”

Eric Branch covers the 49ers for The San Francisco Chronicle. Email: Twitter: @Eric_Branch