In general yes, although specific law courses may be more competitive than other specific medicine courses (e.g. LSE law vs Cambridge medicine).
However as you noted, the process of actually going into work after you earn your degree is different in each. In medicine provided you pass the degree you are essentially (at the moment) more or less guaranteed an FY1 job somewhere. For law, there is no such guarantee and even doing very well in your degree doesn't necessarily guarantee you a job either. Work experience would be essential to make yourself a competitive candidate for a training contract (and I assume pupillage, although the Bar is slightly more focused on academics I gather) for law students. Also you would need to get together the money for the SQE (and potentially a prep course for it) or the BPTC, the latter of which I think is fairly expensive, and neither of which are eligible for SFE postgrad loans funding. While medicine does have grad exams for doctors, you're essentially guaranteed a paying FY1 job before you need to do those unlike law.
So while for medicine overall the highest barrier to entry to the profession is upfront when applying to the degree, and thereafter there aren't that many major attrition points - although there are some (e.g. applying to specialty training), being unsuccessful at that stage doesn't prevent you still being a doctor, you may just need/want to take go into a different specialty if you are unsuccessful. For law the highest barriers to entry for the profession arguably come after the degree - and there are more attrition points (applying to the law degree, getting a good result in the law degree, applying to TCs/pupillage, paying for and undertaking the SQE/BPTC...) at which individuals can "fail" in their journey to become a practicing lawyer (not necessarily even of their own fault).
That said as noted above if this is part of a decision making process to choose between them, it's a not a good set of criteria to choose between them compared to the many other differences between the very different degrees and professions.