I think your problem may be that the result of a bbcode replacement is html but not a template, so you can't include variables. (To check that that's your problem, view the html source of the page and if you see
Code:
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
then that's the problem).
What to do about it - I'm not sure. You could use a plugin on one of the hooks in the bbcode code (like maybe bbcode_parse_complete) do your own search and replace.
For instance, use "__SECURITYTOKEN__" in your bbocde
Code:
<input type="hidden" name="securitytoken" value="__SECURITYTOKEN__" />
and then in the plugin
Code:
$text = str_replace('__SECURITYTOKEN__', $bbuserinfo[securitytoken], $text) ;
but I haven't tried it so be prepared to debug.
Of course that's not a perfect solution because __SECURITYTOKEN__ could conceivably show up in a post for some other reason, but it's the best I could do off the top of my head.