The New York Times article that you linked is clear what the federal court considered to be the problem with the fact that some users were blocked from interacting with Trump's twitter account (my emphasis):
The First Amendment prohibits an official who uses a social media account for government purposes from excluding people from an “otherwise open online dialogue” because they say things that the official finds objectionable, Judge Parker wrote.
Apparently it is the selectivity of the blocks that the federal court regarded an issue here, not the fact that commenting was restricted in general – only some people were targeted so that they were prevented from voicing their opinions in response to tweets from Trump's account, while others could participate freely in the online conversation (my emphasis):
“We are not persuaded [that Trump's Twitter account was personal and not official in nature],” Judge Parker wrote. “We conclude that the evidence of the official nature of the account is overwhelming. We also conclude that once the president has chosen a platform and opened up its interactive space to millions of users and participants, he may not selectively exclude those whose views he disagrees with.”
Disabling the comment function on a YouTube video for all users doesn't seem to compare to that: By doing so, the video can't be considered an "otherwise open online dialogue" in the first place, and it doesn't "selectively exclude those whose views" the White House disagrees with.
One may choose to argue that that notwithstanding, disabling the comment function is still a violation of the First Amendment. However, this claim cannot be backed up by the court decision against Trump's Twitter account, as the federal court's ruling was based on conditions that do not apply to the YouTube comment section.