While I've seen some at-the-knee shorts on men and above-knee skirts on women, it's best just not to take the chance. How far one might be allowed to push the boundaries may depend on whim of the guards on duty any particular day. The same "respectful" dress rules apply to Vatican Museums and pretty much to any church in Italy so we cheerfully go along!
Along this line, I've found the photo on the ad for Dark Rome's "Full-Day Vatican Highlights for Families and Colosseum for Kids Combo Tour" amusing as all 4 family members are inappropriately dressed!
https://darkrome.com/vatican-tours
The tour description includes the text, "Please note that appropriate dress is required for entry into some sites on this tour. Knees, shoulders and backs must be covered." But..but..but the picture....?