Law firms have had trouble enforcing office attendance policies. But with the labor market tightening and more personnel cuts likely, some have become more assertive, law firm leaders and industry observers say, planting stakes in the ground by tying bonuses or job retention to in-person work.