When the Lord of Beirut stood up to Frederick II's threats and then walked out of the trap set by the Emperor a free man, it was by no means clear that he would ultimately win. He left behind his eldest sons, and, while the bulk of the Cypriot nobles and knights backed him at that moment, he had just flung down the gauntlet at the most powerful man in Christendom.
John of Beirut was conspicuously absent from Queen Yolanda's escort. Presumably he was still out of favor with Brienne, or simply too busy on Cyprus or in Beirut. There is no reason to presume he would have refused to take the oath, however, since there was a clear precedent for the consort of a ruling queen to take precedence over the widower (even if crowned an anointed) of a deceased queen: this was precisely the precedent set -- with the full and hearty support of John's parents -- when Queen Isabella and Conrad de Montferrat had been preferred over Guy de Lusignan in 1190.
The Emperor was forced to seek terms. In exchange for the return of the castles to royal officers, the Emperor promised to release the hostages. In addition, Beirut promised to take part in the Emperor's crusade, along with all his vassals, while the Emperor agreed, in writing 1) to take no action against Beirut or his supporters without the judgement of the appropriate court (i.e. the High Courts of Cyprus and Jerusalem respectively), and 2) to bear no malice for all that had passed between them in the preceding months.
The value of the Emperor's sworn and signed word was soon demonstrated when, as soon as he had Beirut and all his men on the mainland, he sent imperial mercenaries to Cyprus to attack, harass and intimidate the wives and children of these same men now serving in his army. He entrusted one of his Sicilian noblemen, the Count of Cotron, with this task. The degree of their success can be measured by the fact that Beirut's his sister-in-law, the widow of his brother Philip, was in sufficient fear for her life that she risked a winter crossing to Syria in a small craft with her young children and all nearly drowned in the attempt to escape.