Deny node access depending on field value
With what user do you check the access, as stated in the docs


  The administrative account (user ID #1) always passes any access
  check, so this hook is not called in that case. Users with the "bypass
  node access" permission may always view and edit content through the
  administrative interface.


user 1 will always have access ..

Make sure to check with an anonymous or regular user.