I think placing some emphasis on style and conventions is important, yes -- learning how to follow style guides is a skill worth training and learning to be detail-oriented is an important meta-skill.
That said, I think it's fine to introduce some leniency by allowing students to use whatever convention they want as long as they're consistent, especially for things like curly brace placement or tabs vs spaces. If the goal is to train students to acquire a sense of craftmanship, having them demonstrate they know how to be consistent is enough, I think.
Some formatting rules do seem to be more universal though (across languages and style guides), such as adding spaces around binary operators. It's probably worth enforcing rules like those, to make sure students acquire correct "muscle memory".
I think the answer to your question might also vary depending on age -- the older students are, the more we should expect from them. In particular, once students are at the undergrad level, they're basically adults and expecting them to be detail-oriented seems pretty reasonable to me, especially if they plan on doing CS as a career. After all, sloppiness in the small often tends to translate into sloppiness in the large, and churning out students who think it's ok to cut corners seems somewhat irresponsible to me.
One middle ground between enforcing and ignoring convention would be to provide students with a linter (which they can perhaps tune with your permission?). If you make students responsible for turning in code that perfectly passes the linter as a binary pass/fail sort of thing, you'll make sure standards are maintained without putting too much pressure on the students. This also has the added benefit of being more representative of how development is actually done in industry.
I would probably introduce these tools only after your students have had a chance to develop a sense of consistency and craftsmanship, though.