Can you try in plain SQL instead of spark.sql() API? According to the docs, this is the command to do it :

ALTER TABLE myDeltaTable SET TBLPROPERTIES (delta.enableChangeDataFeed = true)

docs https://docs.databricks.com/delta/delta-change-data-feed.html#enable-change-data-feed