How to install a package via `apt-get` without flagging it as manually installed

Solution 1:

You can add it to the list of automatically installed packages once again.

sudo apt install package
sudo apt-mark auto package