How to get Uniprot and swissprot cross references using Biopython
I believe the attribute you should be looking for is dbxrefs:

[x for x in record.dbxrefs if x.startswith('GO:')]


Apparently SeqIO handles uniprot text files differently than the SwissProt module:

from Bio import SwissProt
record = SwissProt.read(open('single_record_from_uniprot.txt'))
record.cross_references


So you should change you code to use the SwissProt module to get the behavior you expect