Chris Davis hit the tiebreaking home run in the 11th inning, part of a six-run uprising that carried the Orioles to an 8-2 victory Monday night.
"He's having a great year," Strasburg said. "I need to do a better job of being smart with the location and not necessarily get into the whole challenge, challenge, challenge."
Cruz got the better of that confrontation, but Strasburg had no complaints after turning in a solid encore to his previous outing, when he allowed one run in 7 2-3 innings against Colorado.
"I just wanted to go out there and try to build out the last start, just focus on the execution of the pitches," the right-hander said. "We played great defense, but it was tough how it ended."
The Orioles came in ranked second in the majors with 107 home runs, and they padded that total with three in the 11th.
After Cruz led off with a broken-bat single off Craig Stammen (0-4), Davis worked the count full before launching a drive into the center-field seats to end a 2-for-38 funk that had dropped his batting average to .198.
"I really did not think he would be able to hit that pitch out," said Stammen, who had allowed one home run all season. "He was right on it and he was looking for it. It was a little bit higher than I wanted it."
It was Davis' 14th home run of the season, the first since a game-winning, pinch-hit shot against the Chicago White Sox on June 23. He led the majors with 53 homers last year.
"Nobody likes to struggle, but at the same time I try to keep a positive mind frame," Davis said. "If you sit there and dwell on how bad you are scuffling, it's going to be hard to get out of it."
T.J. Macfarland (2-2) worked two scoreless innings for the win.
Machado had a career-high five hits to help the Orioles earn their seventh win in eight games.
Anthony Rendon homered for the Nationals, who lost for only the second time in nine games.
The first seven innings featured a pitching duel between Baltimore's Chris Tillman and Strasburg, each of whom had a solid outing interrupted by a two-run homer.
Tillman gave up two runs on five hits, striking out six and walking one.
Strasburg's nine strikeouts were his most in six starts since June 4.
Each team managed only one hit over the first three innings. Machado doubled with one out in the top of the first, and Strasburg singled on a 3-2 pitch in the third.
In the fourth, Machado led off with a single and Cruz drove a 1-0 pitch over the wall in right-center. Cruz has already topped his home run total of last year, when he hit 27 during a season cut short by a 50-game suspension as part of the Biogenesis performance-enhancing drug scandal.
Strasburg struck out the next four batters before Tillman grounded out to end the fifth.
The Nationals didn't get a runner past first base until the sixth, when Denard Span hit a leadoff single and Rendon followed with his 13th home run, the first since June 24. He hit only seven last year.
NOTES: Washington's Bryce Harper went 0 for 3 and is 4 for 24 since coming off the DL on June 30. ... Washington's Wilson Ramos extended his hitting streak to a career-high 11 games. ... The Orioles optioned RHP Kevin Gausman to Triple-A Norfolk and purchased the contract of RHP Julio DePaula from Double-A Bowie. Baltimore manager Buck Showalter said the move was designed to fortify the bullpen while addressing the inning-count Gausman is on this year. ... Nationals RHP Doug Fister and Orioles RHP Bud Norris each seek their eighth win Tuesday night in the second game of the home-and-home series, which moves to Baltimore on Wednesday night. ... Washington played its 12th consecutive errorless game. Since moving from Montreal in 2005, the Nationals' longest errorless streak is 13 games, in 2011.