Writing is the toughest part in English test. I don't know how they score it because the way we think and write is different than the way native think and write. My guess is that they scoring base on how closely you are to the native, not how well you are with your grammar. That's why only an extreme small fraction of non-native ever score 7 or above.
Actually, speaking on behalf of the Native Speakers
(and by the way, kudos to all the non-native speakers, because my language is a hot mess and I don't know how someone not "born into it" can learn it well enough to score highly on any English language test!), it's actually not the easiest thing in the world to get full marks on the writing portion of the English language test sometimes, for us, either
I did CELPIP, not IELTS, so I can't speak as an expert, but if IELTS is anything like CELPIP, one of the key things you need to ensure is that you're using complex/combo sentences and big words in your writing. This is where I messed up (even though I technically knew better, but I couldn't bring myself to do what they wanted). You see, in business writing, the PROPER standard is to use the simplest words and simplest sentence structures possible to ensure you're getting your point across quickly and simply, and so that all parties reading it understand perfectly. However, for CELPIP, because they want you to show that you're capable of writing complex sentences and have a big vocabulary, you'll be scored down if you try to write according to the proper principles of business writing. They don't explicitly state that this is what they want on the test either, so you just have to know before you go into the test. So practice learning and using big words (and synonyms - words that mean the same thing) to show the breadth of your vocabulary and practice crafting long, hybrid sentences (using semi-colons, and oxford commas, and parenthesis (brackets) and the like).
Unfortunately, the CELPIP is like a lot of other exams in this world. It tests you more on your ability to take the test, rather than on the actual subject matter the test is covering. That's why it's important to get study materials that give you insight into what the testers/scorers are expecting and looking for, and to take practice tests.
I should also add that I'm told that the speaking part of the tests are also hard for non-native speakers (maybe even moreso than the writing section, for some). Again, I'm not an expert on the IELTS, but my friends who have taken it say that the CELPIP speaking test is harder because you're talking to a computer and can't play off another human being, whereas with IELTS (or at least some versions of it) you are speaking to an actual person, who you can play off of, and who will ask you questions to help the conversation along. The key thing is to ensure you're not getting TOO hung up on what the question is asking you (still try to answer based on the content, to show that you understood the task/question but don't get flustered if you don't know enough about the subject matter to provide a proper answer (so, for example, say the question is about fine art, and you know NOTHING about fine art. Don't get flustered trying to recall information about fine art - just say, "Well, I don't know very much about fine art, to be honest, but..." and talk about your limited understanding of it, and maybe why you don't know more about it, or why you're not interested in it, or something like that). The point is just to talk and show you're capable of speaking in English, not to show your mastery of the subject matter being discussed.