You could add features (constraints) to project_A_* nodes in slurm.conf:
NodeName=DEFAULT ...
NodeName=project_A_[01-80] Features=project_A
and then in your batch script template for project_A add something like
#SBATCH --prefer=project_A
Of course this will require project_A accounts to use your template, since Slurm doesn't have a builtin mechanism to require accounts to use constraints.
References:
https://slurm.schedmd.com/slurm.conf.html#OPT_Features
https://slurm.schedmd.com/sbatch.html#OPT_prefer
I didn't test this solution, just basing it on documentation.
This should overcome the issue with using multiple partitions in sbatch -p, namely:
If project_A job requires 2 nodes, but currently only 1 node is available in partition project_A_part, the job will be allocated both nodes from general_part, and there is no guarantee the free project_A_ node will be used.
HTH,
--Dani_L.