Softening of a flat phonon mode in the kagome ScV6Sn6