This is a classic
XY problem[
^] - you're trying to solve problem X, you've decided the solution must be Y, and you're asking for help implementing Y rather than asking for suggestions to solve X.
The only way to prevent the browser - and thus the end-user - from seeing the value of a hidden field is to not send that field in the markup at all.
Anything you send to the client can be viewed by the client. Even if you managed to find some secret hack to force the page inspector and "view source" option to hide the value in your hidden field, the user could still use a tool such as Fiddler or Wireshark to capture the raw HTML sent back from your server.