Is it your own recipe you created? If yes then you don’t have to. It was gracious of you to offer to make another cake.
Or do what housewives did back in the day, sneaky and underhanded. Share the recipe but leave out an ingredient so the friends cake never comes out the same as yours. <-— people actually do that, I wouldn’t. Seems cowardly.
Marie Barone did that to her DIL, Debra Barone
When I was a kid and my friends wanted to “borrow” my bicycle I always snuck a few parts off the brakes before I loaned it out. We had a lot of hills in the neighborhood. Did the same thing in the Winter with my Flexible Flyer snow sled. More or less.
Recipe from Betty Crocker, 1933.