That’s not exactly what they held. They held that the President is immune from prosecution for official acts. Prosecutorial immunity doesn’t mean his conduct is not unlawful; it means he can’t be criminally prosecuted for it. That distinction is important because it doesn’t prevent courts from issuing injunctions. And, as stated by others, the immunity is extended only to official acts. What constitutes an official act isn’t super clear yet, but I think it’s safe to assume that golfing isn’t an official act.