Uncovering the material dissipation mechanisms of two-dimensional materials is essential for their implementation in advanced devices. While graphene resonators are highly attractive due to their high operational frequency and excellent durability, they dissipate a considerable amount of energy due to significant material dissipation associated with atomic friction manifested by the relative slipping of atomic layers. We mitigate the atomic friction by changing the atomic composition of the devices through the insertion of boron and nitride atoms that create polar interlayer bonds and, therefore, also reduce the energy dissipation. As a case study, we built boron carbonitride (BCN) foam cantilever devices and studied their frequency responses compared to those of their graphene counterparts. Indeed, we show that inserting boron and nitride atoms into the lattice improves the interlayer interactions and, thus, reduces the interlayer atomic friction. In addition, the air dissipation of BCN is also lower than that of graphene. Therefore, we pave the path for the development of BCN devices with tunable dissipation.