I believe this a tradition of what is called a reverse brevet.
His actual rank is Commodore, but as he was filling a Captain’s role he followed the tradition of wearing a Captain’s rank.
This has the practical effect on ensuring that there would be no confusion in the chain of command if the carrier was part of a flotilla where another officer was breveted as a Commodore in command, and probably accommodated along with his staff on board the carrier.