Sir Paul McCartney has recorded a "silent" song in protest of the UK government's approach to AI copyright law.