There is a user script written by Glorfindel available on Stack Apps that does this: Accepted Answer Pinner.
Link toSee Glorfindel's original announcement postoriginal announcement post under the MSE announcement for the change: https://meta.stackexchange.com/a/369579.