This is strange indeed and looks like a bug:
class C {
var x: Int = 0
var y: Int = 0
var z: Int = 0
}
print(MemoryLayout<C>.offset(of: \.x)) // nil
print(MemoryLayout<C>.offset(of: \.y)) // nil
print(MemoryLayout<C>.offset(of: \.z)) // nil
Here's a quick & dirty workaround, although it is not 1:1 as it needs a class instance vs a class itself and it wants explicit fields rather than keypaths:
let c = C()
let address = Int(bitPattern: ObjectIdentifier(c))
let xOffset = withUnsafePointer(to: &c.x) { Int(bitPattern: $0) } - address // 16
let yOffset = withUnsafePointer(to: &c.y) { Int(bitPattern: $0) } - address // 24
let zOffset = withUnsafePointer(to: &c.z) { Int(bitPattern: $0) } - address // 32