As per gfx-rs/gfx#3716 (comment) :
macOS has a system shader cache at $(getconf DARWIN_USER_CACHE_DIR)/com.apple.metal
On my MacBookPro that is under /var/folders/52/l9z1nqld5yg99tb_s3q6nyhh0000gn/C
- System shaders:
/var/folders/52/l9z1nqld5yg99tb_s3q6nyhh0000gn/C/com.apple.metal
- Blender shaders:
/var/folders/52/l9z1nqld5yg99tb_s3q6nyhh0000gn/C/org.blenderfoundation
Delete all the folders in there to clear the cache.