List as key for dictionary or set is not valid. Because key should remain constant when we want to access values in dictionary for example. Values can change but keys always remain constant.
So in your case:
mat = [[1,2,3],[4,5,6],[1,2,3],[7,8,9],[4,5,6]]
We need to convert inner list to tuple. It can be done by
map(tuple, mat)
Now tuple can be used as key for set/dictionary because tuple's key cannot be changed.
dict.fromkeys(map(tuple, mat))
Since we need final answer as list of list we need to convert all tuple keys of dictionary as list. We don't care about values so we only read keys from dictionary and convert it to list.
mat = map(list, dict.fromkeys(map(tuple, mat)).keys())
Now mat would look something like this.
mat = [[1,2,3],[4,5,6],[7,8,9]]
In Python 3.8+ dictionary will preserve order for older version, OrderedDict can be used.