Most law degrees don't mandate any specific A level subjects. Those which do are happy to accept a wide range of A levels, including STEM subjects.
For example, here are the A level subject requirements for Law at Manchester (which I picked at random), with some STEM subjects highlighted:
"Applicants must be studying at least one of the following A Level subjects: Law; Accounting; Economics; Finance; Business Studies; Development Studies; Government and Politics; Economic and Social History; Mathematics; Anthropology; Sociology; Philosophy; Religious Studies; English Language; English Literature; Geography; Psychology; Classical Civilisation; History; Archaeology; Communication Studies; Environmental Studies; World Development; Biology; Chemistry; Physics; Modern Languages."