Spread butter all over the pork tenderloin. Season with salt, pepper, and thyme. Combine garlic powder, apricot preserves, honey, and sherry in a separate bowl.
Roast the pork in the preheated oven for 30 to 40 minutes. Remove the pork from the oven and brush with the apricot sauce. Return the pork to the oven. Continue roasting, basting occasionally with the remaining sauce, until the pork is no longer pink in the center, about 15 minutes. An instant-read thermometer inserted into the center should read 145 degrees F (63 degrees C).