Can you implement transient attributes in Core Data with generated class definition?

I see in the docs under Derive a Non-Persistent Value Using a Transient Attribute that transient attributes can be produced with custom getter methods. However, if you use Codegen, a custom getter would raise an invalid redeclaration error in Xcode. In that case, is it possible to still implement transient attributes, even with generated properties?

I'm specifically interested in a solution that works with SwiftUI.