The Pakistani Taliban and other militant groups have grown more emboldened since the Afghan Taliban returned to power in Kabul in 2021.