How do I prevent other Department heads from seeing salaries in Departments for which they are not responsible?

This can be taken care of in User Permissions, or in Manage Departments.

In Users > All Users, select the Edit Tool on the right of the Department Head you wish to work with, and under the Departments menu, choose only those that they need to see.

In Settings > Manage Departments, click the Edit Tool for the department you wish to work on, and from the User menu choose the Department heads that need to see the budget for that department.

If a user only has permission to see one department, and there is an employee whose salary is partially allocated to that department, and partially elsewhere, the user will not see that employee's salary.