I believe that the story of Char Sahibzadeh being "bricked alive" was a popular 'tragic end' that got adopted by many community legends, with the Sikh version becoming most famous.
Multiple accounts from the same period associate this tragedy to their heroes.
The earliest Sikh account to mention the four Sahibzade being bricked alive, as far as I know, is Koer Singh’s Gurbilas Patshahi 10, which is generally dated to the post-1750 period.
For instance, I came across an account of the Pathans of Farrukhabad recounting the tragic fate of their heroes - the five brothers of and five lieutenants (the Indo-Aryan chelas, also raised as brothers to) Nawab Qaim Khan Bangash - calling the former Panch Sahibzadeh and latter Panch Chele, and stating that they were bricked alive in the Allahabad Fort.
When Nawab Qaim Khan was killed, these 10 people were taken as hostages as security by Nawab Safdar Jung, and later all of them were executed when Nawab Ahmad Khan Bangash rose against Nawab Safdar.
The most famous martyr among them was Shamsher Khan Chela (the lieutenant), about whom the legend continues that, as he was being led to his execution, he was offered a palanquin, as befitted a nobleman, but refused it.
As he was being executed, Jalaluddin Haider (the future Shuja-ud-Daulah) asked him where his sword was. He replied with the following verses:
Haman sher-o shamsher-e burran manam;
Chi sazam, keh qabzah nadarad sar-am!
Va gar nah tura khanamanat haris,
Ba yak dam tah-e kha k kardam adam.
Rough tr: "I am that very lion and razor-sharp sword; but what can I do, for my head lacks a hilt. Otherwise, you greedy one, I would have reduced you and your entire household to non-existence beneath the dirt in a single breath."
A Mughal standing nearby weeped and reportedly cried out that one of the greatest saints of the age has been executed.
———
Pathans of Farrukhabad aren't the ones who incorporated this legendary tragic fate, it existed in Gwalior and many other places.