You stacked MR, don't do that. When Akali's maxing E and building a Titanic she deals more physical damage than magic.
Was dominating lane early
Here's the thing, despite you saying you were dominating early she has a CS lead on you. That tells me that you most likely misused your lead. What you should be doing when you're up in a bully matchup is attacking creeps as little as possible and trying to let the lane push into you. If the wave ever pushes past the river towards you you should move in front of it and she will not be able to pick up CS.
Your goal is not to kill in a bully matchup, your goal is to deny as much farm as you can. This means that you should never cast your Q unless she walks in range of it and only use W when you need it to reset your AA and grab an extra creep.
Akali has an incredibly weak and exploitable early game you need to play around this and keep her out of the game.
I'm not exactly thrilled to see that both Yi and Akali are covering one of their main weaknesses which is being squishy and easy to cc lock so I'd like advice on how to counter
Just rememberer that in covering that weakness Akali is also losing a strength. Tank Akali is fairly similar to Irelia, she has damage but as long as you respond to her it's not high enough to assassinate somebody.