You are right, I need to update the code. You need to place the nested LAYOUT OVERLAY into a LAYOUT…