For the United States, the particular law is as follows: "The National Conference of Catholic Bishops, in accord with the prescriptions of canon 284, hereby decrees that without prejudice to the provisions of canon 288, clerics are to dress in conformity with their sacred calling.
In liturgical rites, clerics shall wear the vesture prescribed in the proper liturgical books. Outside liturgical functions, a black suit and Roman collar are the usual attire for priests. The use of the cassock is at the discretion of the cleric.
In the case of religious clerics, the determinations of their proper institutes or societies are to be observed with regard to wearing the religious habit."
usccb.org/beliefs-and-teachings/what-we-believe/canon-law/complementary-norms/canon-284-clerical-garb.cfm
I am not sure what comparison there is to be made between a person who can’t wear some article of clothing, due to safety concerns, and a priest who happens to go to the grocery store. He’s not going to lose a finger because he’s wearing a cassock at the deli or meat section.
And, as far as Pope John Paul II is concerned–yes, he used common sense when he was out on the slopes or wherever else. But, let’s also recall that he said this in his 1982 Holy Thursday letter to priests, in the form of a prayer to our Blessed Lord: “Save us from ‘grieving your Spirit’… by whatever shows itself as a desire to hide one’s priesthood before men and to avoid all external signs of it, by whatever can in the end bring one to the temptation to run away, under the pretext of the ‘right to freedom’” (Part II, 4).
miraclerosarymission.org/ltr1982.htm
Dan