Retirement tax questions

It is clear to me now why we are not agreeing on this matter. Simply because I've seen a 1099-R with code 8 being issued for a prior year return of excess, with federal and state tax withheld. What you are saying this should not be case, code P must be used when the return is for a prior year deferral. In fact it happened to me:):):)  I received the check in January of 2019 saying that I over contributed to my 401K in 2018. Knowing that they will issue a 1099R by January of 2020, I didn't do anything about it in my 2018 tax return. I wasn't sure what the code will be, but I decided to wait. In January of this year I received the 1099-R with code 8 and taxes withheld for both federal and state. I am not sure why they issued it this way, but it worked for me and I didn't have to amend 2018. Thank you so much for your time! This has been a very informative conversation.