MIAMI — Coaching the Nets has become a little like playing “Whac-A-Mole” for Kenny Atkinson. A few weeks ago, he focused on improving the offense with some success, only to see the defense fall apart. After two awful defensive performances in Cleveland and Minnesota, Atkinson returned his focus to improving the Nets’ defensive toughness.

He got some positive results Monday night as the Nets generally fought harder and held the Heat to 48 second-half points and guards Goran Dragic and Dion Waiters to 2-for-14 shooting after halftime. But it wasn’t enough because poor three-point shooting and too many turnovers derailed a fourth-quarter comeback attempt by the Nets in a 104-96 loss at American Airlines Arena.

It was the eighth straight win for the Heat (19-30) and the sixth straight loss for the Nets (9-39). Dragic (20 points, eight assists) and Waiters (19 points, nine assists) still led the Heat and helped them take control of the game with a 17-0 run near the end of the first half. James Johnson added 17 points and five assists off the bench.

Bojan Bogdanovic topped the Nets with 16 points. Brook Lopez had 14 points but was 0-for-6 from three-point range. Isaiah Whitehead had 13 points and five assists off the bench.

The Nets ultimately were doomed by their 4-for-26 three-point shooting and a flurry of turnovers in the final two minutes. The five Nets starters all finished with negative plus-minus numbers ranging from -7 to -19, and the entire bench was on the positive side.

“I thought we competed better defensively,” Atkinson said. “We didn’t make enough shots . . . I was proud of the way we competed defensively. We were better with those 50-50 balls, we were better on the boards. We had more physicality. We showed toughness tonight. I thought the guys played with a hunger. Offensively, we didn’t get it done.”

advertisement | advertise on newsday

Although he had threatened lineup changes if the defense didn’t improve, Atkinson stuck with the same starting lineup. But he vowed to make defense a priority.

“One thing I really want to keep an eye on is our progression, how we’re going to finish this up the rest of this season,” Atkinson said before the game. “Where do we go? Right now, we’re trending really downward.”

In the first half, that downward trend continued unabated as the Heat shot 50 percent and overcame an 11-point Nets lead with a 17-0 run just before halftime, including eight points by Waiters. That extended into a 26-4 run as the Heat pushed its lead to a high of 67-54 at the start of the third quarter.

Part of the reason for that letdown had as much to do with the Nets’ stagnant offense as with their defensive effort. “Sometimes the other team might go on a run, hit a couple shots, and then we just hang our head,” forward Trevor Booker said. “We’ve got to do a better job of punching back. Be more aggressive on offense and defense.”

At that point, Atkinson inserted the kids — Whitehead, Caris LeVert and Rondae Hollis-Jefferson — and the tide shifted in the Nets’ favor as they trimmed the deficit as low as four points before the quarter ended.

Lopez was upset with his 5-for-17 shooting performance and two-point fourth quarter. “I’m very disappointed in myself,” he said. “I think I hurt our team a lot. I need to be better. I can’t have nights like this. I have to have better focus and be more aggressive and be the player I know I can be.”