In the UK there are 4 breeds of dog that it is illegal to own (Pit Bull Terrier, Japanese Tosa, Dogo Argentino, Fila Brasileiro). The government says "A police or council dog expert will judge what type of dog you have" and "Going to court - It’s your responsibility to prove your dog is not a banned type" but no information is given about the form that this determination will take.
There is currently an example of this happening, where the breed was determined to be American Bully XL (a legal breed which is a derivative of and is physically similar to the illegal Pit Bull Terrier).
In this day and age the most obvious solution for defining a breed is some form of genetic testing, probably with some machine learning thrown in. In this case I would expect the rules to be well known, and hopefully published in a peer reviewed journal, and I am not aware this is the case. Another way would a be predefined list of physical traits that could be used to define a breed, but again this could be published and made available to people who were concerned and no such list is on the government page above.
How are illegal breeds of dog legally defined or determined?