it is only logically that minimax alsways plays same against itself because of the way you code that but is it really right?
(I wont add my code now just asking that question)
Yes, the minimax algorithm is deterministic -- if we assume it makes no use of some heuristic evaluation function that is non-deterministic.
The code will always start from the same initial state, and from that state it calculates what the next move will be. There is no randomness in that. Every time it will pick the same move when given the same game state.
If you want this to behave differently, then modify your code such that it collects all moves which have the same best value, and then let it pick a random move from that list of bests.
The answer given by Trincot is almost correct. Minimax will always give the same answer, IF you search for the same depth each turn (given a deteministic evaluation function).
However, the results may be different if you search for lower/higher depth than originally. Lowering the depth will for example make a chess engine think fewer moves ahead, which is one way of limiting its strength and make it play worse moves.