Monitoring the file descriptor on Linux (by checking / proc / $$ / fds) and the file descriptor on Windows (using the SysInternals tools), it seems that the file closes immediately after the instruction.
This cannot be guaranteed, as the garbage collector must execute. In the testing I did, it closes every time.
The operator is withrecommended to be used with open, however, cases when it is really necessary are rare. It's hard to demonstrate a scenario in which you should use it with, but it's probably nice to be safe.
So your single line font will look like this:
with open(to_file, 'w') as tof, open(from_file) as fof:
tof.write(fof.read())
with , ( io), __exit__(), *, .
* - os._exit().