"The medication works in two ways: First, it interrupts viral replication by preventing HIV from reaching the nucleus of an infected cell, which then blocks reproduction.
The second mechanism is for cases in which integration of the HIV genome has already occurred. In this instance, lenacapavir interferes with production of viral progeny, “making them defective so that they are not able to infect other cells.” Therefore, it works in both early and late stages of the HIV life cycle to disrupt replication."
Since the drug works in two ways, it would be difficult for the virus to adapt. Similarly to how the current commonly prescribed PrEP regimen (Descovy or Truvada) is two different drugs in one pill and has not lead to any significant rise in resistance.