Gröbner bases of syzygies and Stanley depth