"Your composure and dignity viewing the sequence of events was remarkable," he wrote on Twitter. "Your dignified grace and silence 48 hours since is simply remarkable. We know you have one hand on that WC. You not just Kane. You Kane and Able. God bless."
Williamson was named player of the Cricket World Cup at the presentation ceremony after the final and was later picked as captain of the team of the tournament.
After the final, the 28-year-old admitted that it will take some time to get over the loss.
"It will take a little bit of time," he told Radio Sport. "You get waves. You just forget about it for 10 minutes then it hits you again … goodness me what was all that about, was that real?
"It was an amazing day, amazing game of cricket, but a real shame it was decided after teams couldn't be separated at two attempts at playing cricket but that's the way it goes."
Shastri's comments about Williamson come as he fights to keep his job as head coach of India, with the country's cricket board (BCCI) advertising the positions of head coach and the support staff of the men's team since their upset loss to the Black Caps.