c ++ – Game Playing AI – Strategy to overcome the transposition table by taking too much memory?

I've created an engine that plays on Connect Four using standard search algorithms (minimax, alpha-beta pruning, iterative deepening, etc.). I have set up a transposition table so that the engine can immediately evaluate the same position reached via a different movement order, as well as to allow the order of displacements.

The problem with the TT is that at each stage of the iterative deepening process, the number of bytes it takes increases at least double. The TT stores objects that represent important information for a given position. Each of these objects is 288 bytes. Below, the depth limit is the distance at which the engine searches at each stage of the iterative deepening:

limit depth = 1 – TT size = 288 bytes (as only one node / position is viewed).

maximum depth = 2 – TT size = 972 bytes.

maximum depth = 3 – TT size = 3708 bytes.

maximum depth = 4 – TT size = 11664 bytes

maximum depth = 5 – TT size = 28476 bytes.

….

maximum depth = 12 – TT size = 11,010,960 bytes.

maximum depth = 13 – TT size = 22,645,728 bytes.

And now, at this point, the .exe file crashes.

I wonder what can be done to solve this problem. In Connect Four, the branch factor is 7 (since there are usually 7 possible moves, at least at the beginning of the game). The reason why the TT does not grow by a factor of 7 at each stage is due to the pruning methods that I have put in place.

This problem does not matter if the engine only searches up to 8-9 depth, but my goal is to have it rebut Connect Four by going to the end (so the depth limit = 42).