Ola Italo.
O problema está no retorno da cidade atribuída pela BETHA como demonstração, alterei a função abaixo pra teste e finalizou corretamente.
procedure TNFSeR_ABRASFv1.LerEnderecoPrestadorServico(const ANode: TACBrXmlNode;
aTag: string);
var
AuxNode: TACBrXmlNode;
xUF: string;
CodigoIBGE: Integer;
begin
if not Assigned(ANode) or (ANode = nil) then Exit;
AuxNode := ANode.Childrens.FindAnyNs(aTag);
if AuxNode <> nil then
begin
with NFSe.Prestador.Endereco do
begin
Endereco := ObterConteudo(AuxNode.Childrens.FindAnyNs('Endereco'), tcStr);
Numero := ObterConteudo(AuxNode.Childrens.FindAnyNs('Numero'), tcStr);
Complemento := ObterConteudo(AuxNode.Childrens.FindAnyNs('Complemento'), tcStr);
Bairro := ObterConteudo(AuxNode.Childrens.FindAnyNs('Bairro'), tcStr);
CodigoMunicipio := ObterConteudo(AuxNode.Childrens.FindAnyNs('CodigoMunicipio'), tcStr);
if CodigoMunicipio = '' then
CodigoMunicipio := ObterConteudo(AuxNode.Childrens.FindAnyNs('Cidade'), tcStr);
UF := ObterConteudo(AuxNode.Childrens.FindAnyNs('Uf'), tcStr);
if UF = '' then
UF := ObterConteudo(AuxNode.Childrens.FindAnyNs('Estado'), tcStr);
CodigoPais := ObterConteudo(AuxNode.Childrens.FindAnyNs('CodigoPais'), tcInt);
CEP := ObterConteudo(AuxNode.Childrens.FindAnyNs('Cep'), tcStr);
{aqui a variavel CodigoIBGE está recebendo o conteudo DEMO retornado pela Betha}
CodigoIBGE := StrToIntDef(CodigoMunicipio, 0);
{Inclui a linha abaixo para testar e finalizou sem problemas, mostrando o preview correto}
if CodigoIBGE = 1000001 then CodigoIBGE := 4217709;
if CodigoIBGE > 0 then
xMunicipio := ObterNomeMunicipio(CodigoIBGE, xUF);
if UF = '' then
UF := xUF;
end;
end;
end;