Path.absolute() is undocumented and thus unsupported, so use at your own peril.
What version of Python are you on? It works for me on macOS Mojave on Python 3.8:
Python 3.8.0 (tags/v3.8.0:fa919fdf25, Nov 1 2019, 15:59:17)
[Clang 10.0.1 (clang-1001.0.46.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pathlib
>>> import os
>>> os.getcwd()
'/private/tmp'
>>> pathlib.Path('file.txt').resolve()
PosixPath('/private/tmp/file.txt')