I am currently reading 村上春樹's 「海辺のカフカ」and I came across several examples of words being written in kanji in one instance and in kana shortly after.
Here is one example where the two writings occur in the same page:
p.282, ln.4 「僕は自分にそう言いきかせる。」
p.282, ln.13 「と自分にいいきかせる。」
Now, it seems like there are no set rules for when to use or not to use kanji, although grammatical constructs and commonly used words tend to be written in kana according to Totland's answer to this question: Where to check if a word is used with kanji or not?.
But is there a good reason for using two different writings instead of sticking with a convention? Is there in fact a rule I am missing? Or could this be a deliberate stylistic choice from 村上春樹?
(I have a suspicion this also happens in other works from different writers but unfortunately I do not have any other example at hand at the moment.)