According to the film's official novelisation, Dooku ordered Grievous not to intervene.
Dooku was, in turn, acting on orders from Palpatine who (unbeknownst to Grievous) was trying to provoke a duel between Anakin and Dooku.
Dooku turned. From his commanding height, he stared down at the
blue-scanned holoimage of Invisible Hand’s commander. “Your objections
have been noted already, General. Leave the Jedi to me.”
“But driving them to you also sends them directly toward the
Chancellor himself. Why does he remain on this ship at all? He should
be hidden. He should be guarded. We should have had him outsystem
hours ago!”
“Matters are so,” Count Dooku said, “because Lord Sidious wishes them
so; should you desire to press your objections, please feel at liberty
to take them up with him.”
“I, ah, don’t believe that will be necessary …”
“Very well, then. Confine your efforts to preventing support troops
from boarding. Without their pet clones to back them up, no Jedi is a
danger to me.”
The deck shuddered again, more sharply, followed by a sudden shift in
the vector of the cruiser’s artificial gravity that would have sent a
lesser man stumbling; with the Force to maintain the dignified
solidity of his posture, the effect on Dooku was confined to the lift
of one eyebrow. “And may I suggest that you devote some attention to
protecting this ship? Having it destroyed with both you and me aboard
might put something of a cramp in the war effort, don’t you think?”
“It is already being done, my lord. Does my lord wish to observe the
progress of the Jedi? I can feed the security monitors onto this
channel.”
“Thank you, General. That will be welcome.”
“Gracious as ever, my lord. Grievous out.”