Preflop
Somewhat loose defense against a HJ open and a CO call, especially when its more than a minraise. But ok you call, and its certainly not terrible.
Flop
I think, there is an argument for leading here, because in a multiway pot the preflop raiser is less likely to C-bet. What do we know about CO? The more fishy / passive CO is, the more I like leading (donk betting). I think, this is certainly "allowed" from a GTO perspective, because you can have more flushes defending your blind than the other guys, so you clearly have a nut advantage here. But ok you check, and its certainly not terrible.
Turn
Unfortunately the flop got checked through, but at least it was a clean turn card. No 4-flush and no board pairing card. Clearly have to bet now to start building the pot.
River
Board pairing but still a clear spot for betting for value of course. Top pair became trips, so very easy to get paid by that hand. And now of course the interesting part, his river raise. Its never great to get raised on the river, but I think, you have to pay this off. Its quite unlikely, he would check back a set or two pair on the flop, so you should only be losing to TT or QTs, which is only a few combos.
If he is a donkey, maybe he can have more boats like QTo or Q9o or whatever. But then he is also more likely to be overplaying trips. So if you fold here to a donkey, you are very likely to become the victim of an accidental value bluff. He think, his AQ is the nuts and is raising "for value", but he makes you fold a much better hand.
In a sense its also better to call here with the K high flush than an A high flush, because then he can have the nakes A of spades, which is probably the most likely bluffing hand. And I am not worried about him having the nut flush, because I dont think, that would ever be played like this. It would either have been bet on the flop, raised on the turn or just called on the river. It makes no sense to slowplay the nut flush and then "spring the trap", when the board has paired, so that he might be beat. So for me he either have a boat, or you are good.
Conclusion
This will probably be a boat pretty often, but in general I am not looking to get away from hands, that are nearly the nuts, when the hand only started with 40`ish blinds. If you had led the flop, then you would have bet the turn and jammed the river, and the result would still have been the same, if for instance he had QT. So if you ended up losing to a boat, I would classify this as just a standard cooler. If the roles are reversed, then I dont think, he is getting away from a K high flush either, just because the board pairs on the river.