Watching the Ecuador performance, there's really some drastic change in his behaviour and energy levels. It is also a possibility his having a massive migraine during the Croatia match by the way he rubbed his forehead during the anthem. He seemed completely off. If you are talking about pressure, the Ecuador match would actually be a very high pressure game as well, but Leo on that day seemed completely focused and when he scored the first goal he was determined to get another and another, which went on to be one of the happiest day of his career. However, alot can change in 8 months, including his, physical conditions, form, external determinants such as media, expectations etc.
I don't condone the walking, I think that sort of becomes a habit for him. But clearly he was affected by the penalty miss and blames himself for that. Willy Wonka's mistake further adds more pressure which he is already having due to his blunder in the first match.
But most fundementally, Sampaoli still needs to change his tactical approach, I think it is IMMENSELY difficult for Messi alone get past defenders, let alone teams who willingly sit deep with a medium or low block. It is a near impossible task, I think facing such situations, most players will already feel half defeated. Furthermore, the GK literally gifted Croatia with a goal when the players are all working so hard upfront trying to break down the defence. Against Ecuador, Messi was able to work with alot of space, as they didnt emphasise on possession and allow Messi in more advanced positions.