This PR is a follow-up for #26462 that introduced a bug on Windows:
0>test\functional\wallet_descriptor.py
1...
2PermissionError: [WinError 32] The process cannot access the file because it is being used by another process:
3...
From sqlite3
Python module docs:
Connection
object used as context manager only commits or rollbacks transactions, so the connection object should be closed manually.