1 -You were playing full AP Shaco. So let's break it down:
1.1- Shaco is an Assassin. Mordekaiser is a Juggernaut. Juggernauts beat Assassins 9 out of 10 times.
1.2- You were a Shaco, one of the most slipery champions in the entire game. And you let a Mordekaiser stick to you, in Melee range, for 2 hits.
2- Things you could have done if you wanted to kill someone who was close to Mordekaiser:
2.1- Q'd away. If you spec into CDR you can have your Q up every 5 or 6 seconds, unless you're using it to jump on a target who's close to Morde (which no Assassin with no escapes ever should), you should have enough time to disengage after taking a hit or two from him.
2.2- Ulted either before his ult to discourage it, or ulted to dodge it entirely. Morde has a little animation (for about 0.2 secs) on his ult, you can dodge it with your R. Specially now that it's much smoother than before.
2.3- Have a box escape path nearby.
3- Things you could have done if you wanted to kill Mordekaiser:
3.1- Not much. See 1.1
3.2- Worked around his Q CD and engaged at him on low health. Assassins are not supposed to assassinate Juggernauts. See 1.1
EDIT: Also good to point out that, in that specific game, Morde had a gold lead over you the entire match after the 15 min mark.
EDIT 2: Morde Only got his Rylais at 29 mins. The only point in the game at which he killed you after that was at the 32 minutes mark, in which he had a solid 2k gold lead over you.
EDIT Number who the hell is counting anymore:
About your second point:
so he gets to build full damage and be non squishy with crazy shielding, constant cc, lifesteal and spellvamp + stupid amount of movement disparity just from rylais and triforce alone?
His build was
. While this is not a tank build, it is by no means a Full Damage one. At best case scenario, it's an hybrid bruiser build.