Some of the above seems kind of hacky and has changed. You can do the following and it will work.
TextField("Placeholder", text: $text) .onAppear { UITextField.appearance().clearButtonMode = .whileEditing }