virsh edit has no impact on domain

I am using virsh edit to edit a domain. After edit it says

Domain ubuntu18.04 XML configuration edited. 

However, reopening the domain with virsh edit shows old file.

The domain is also turned off.

$  virsh list --all --persistent  Id    Name                           State ----------------------------------------------------  -     ubuntu18.04                    shut off 

I have also tried running virsh define to set new configuration.

$  virsh define ubuntu18.04.xml Domain ubuntu18.04 defined from ubuntu18.04.xml 

However, it also did not change the file. How can I edit the domain config file?