Wow, I can't believe your school would do that! Our sixth form makes sure that we have 100% amazing references no matter what. I'm sorry to hear that...
Maybe you could talk to your tutor/close teacher about it, but other then that, there's not much else to do about it. I would recommend that you STRESS in your personal statement that when ever you're off attendance, you're still completing assignments and working hard etc. My friend has good grades like yours, but has a low attendance record. But she still has a high chance of getting into her Universities because our school is stressing how hard she has worked despite low attendance. Maybe your reference teacher would consider writing something like that?
Don't worry too much about it, I'm sure that you'll still get plenty of offers as long as you keep those excellent grades and write an amazing personal statement which contradicts the school's 'unsatisfactory' claims.