Rigidity results for spin manifolds with foliated boundary