(a background about question)
As interest on chess engine programming I'm trying to just re-implement the same methods as many typical engines has. I've implemented MoveGen, DoMove, and basic alpha beta search with simplest form of evaluation consist of a pure PSQT table + material score and a transposition table implementation in-order to avoid searching repeated positions. The current incomplete code works by assigning fix depth (ply) number for searching the best move and fortunately it's doing what its expected to do.
But I faced a strange bug when I was watching one of the engine games and saw that it leaving a rook under direct attack and simply report pushing a pawn as best move. The fix depth number was 6. PV lines report after Iterative deeping till depth 5 reported correctly but when entering depth 6 ply PV changes and engine return nonsense PV line.
After some efforts I found that the Transposition table is the main cause for problem. By removing TT codes engine acts as expected but I need to know what's the exact cause of this. A massive branch factor of chess and making 3 million call to evaluation inside a recursive alpha beta function facing me a big puzzle "how to investigate such problems".

As a second part of question I'd like to know why engines using zobrist hash with generating their own random numbers. I did this a little bit different using the same random numbers that used in polyglot book adapter (with the hope adding polyglot book support later would be a bit easier). Could these random numbers caused to current bug I'm facing?