Hey there,
Just came across your question and I think I have an answer that might be beneficial to you. However, I've previously detailed this answer in another thread that addresses the same issue.
Here is the link to that thread: Introducing Spyable: A Swift Macro for Automatic Spies Generation - #10 by Matejkob. I strongly recommend you go through the comment as it contains a thorough explanation which I believe will shed light on your problem. It's quite comprehensive and should give you a deeper understanding of the matter at hand.
I hope you find it useful. Feel free to comment if you have further questions or need additional clarification on anything.
Best of luck!